Documentation

Catch events

This example show how to catch the editor's events with the subscribe object in settings. See the browser console for the result.

<!DOCTYPE html>
<html>
<head>
    <title>Article Editor</title>
    <meta charset="utf-8">

    <!-- css -->
    <link rel="stylesheet" href="/your-folder/article-editor.min.css" />
</head>
<body>
    <!-- element -->
    <textarea id="entry">
        <p>Content</p>
    </textarea>

    <!-- js -->
    <script src="/your-folder/article-editor.min.js"></script>

    <!-- call -->
    <script>
    ArticleEditor('#entry', {
        subscribe: {
            'app.start': function() {
                console.log('Article started!');
            }
        }
    });
    </script>
</body>
</html>