Documentation

Editor

editor.before.load #

Arguments
html StringSource content of the editor.

Occurs before the editor starts.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.before.load': function(event) {
            ...
        }
    }
});

editor.load #

Arguments
html StringSource content of the editor.

Occurs when the editor is started.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.load': function(event) {
            ...
        }
    }
});

editor.before.change #

Arguments
html StringContent of the editor.

Occurs before syncing content with the source textarea.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.before.change': function(event) {
            ...
        }
    }
});

editor.change #

Arguments
html StringContent of the editor.

Occurs whenever the editor synchronizes content with the source textarea.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.change': function(event) {
            ...
        }
    }
});

editor.insert #

Arguments
$nodes DomInserted Dom elements into editor.
instances ArrayArray of inserted instances into editor.

Occurs when the content is inserted to the editor using the API method editor.insert.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.insert': function(event) {
            ...
        }
    }
});

editor.before.parse #

Arguments
html StringContent of the editor.

Occurs before parsing content.

editor.parse #

Arguments
html StringContent of the editor.

Occurs whenever the content is parsed.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.parse': function(event) {
            ...
        }
    }
});

editor.before.unparse #

Arguments
html StringContent of the editor.

Occurs before unparsing content.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.before.unparse': function(event) {
            ...
        }
    }
});

editor.unparse #

Arguments
html StringContent of the editor.

Occurs whenever the content is unparsed.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.unparse': function(event) {
            ...
        }
    }
});

editor.click #

Arguments
e ObjectEvent object

Occurs whenever a block in the editor is clicked.
This event has event.stop method.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.click': function(event) {
            ...
        }
    }
});

editor.focus #

Occurs whenever the editor gets focus.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.focus': function() {
            ...
        }
    }
});

editor.blur #

Occurs whenever the editor loses focus.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.blur': function() {
            ...
        }
    }
});

editor.mouseover #

Arguments
e ObjectEvent object

Occurs whenever a block in the editor is hovered.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.mouseover': function(event) {
            ...
        }
    }
});

editor.mouseup #

Arguments
e ObjectEvent object

Occurs whenever the editor has a mouseup event

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.mouseup': function(event) {
            ...
        }
    }
});

editor.mousedown #

Arguments
e ObjectEvent object

Occurs whenever the editor has a mousedown event

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.mousedown': function(event) {
            ...
        }
    }
});

editor.keydown #

Arguments
e ObjectEvent object

Occurs whenever the editor has a keydown event.
This event has event.stop method.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.keydown': function(event) {
            ...
        }
    }
});

editor.keyup #

Arguments
e ObjectEvent object

Occurs whenever the editor has a keyup event.
This event has event.stop method.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.keyup': function(event) {
            ...
        }
    }
});

editor.drop #

Arguments
e ObjectEvent object

Occurs whenever the editor has a drop event.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.drop': function(event) {
            ...
        }
    }
});

editor.dragstart #

Arguments
e ObjectEvent object

Occurs whenever the editor has a dragstart event.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.dragstart': function(event) {
            ...
        }
    }
});

editor.dragover #

Arguments
e ObjectEvent object

Occurs whenever the editor has a dragover event.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.dragover': function(event) {
            ...
        }
    }
});

editor.dragleave #

Arguments
e ObjectEvent object

Occurs whenever the editor has a dragleave event.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.dragleave': function(event) {
            ...
        }
    }
});

editor.cut #

Arguments
html StringCut html code

Occurs whenever the editor has a cut event.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.cut': function(event) {
            ...
        }
    }
});

editor.copy #

Arguments
html StringCopied html code.

Occurs whenever the editor has a copy event.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.copy': function(event) {
            ...
        }
    }
});

editor.paste #

Arguments
$nodes DomInserted Dom elements into editor.
instances ArrayArray of inserted instances into editor.

Occurs whenever the editor has a paste event. This event has event.stop method.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.paste': function(event) {
            ...
        }
    }
});

editor.empty #

Occurs whenever the editor is empty.

ArticleEditor('#entry', {
    css: '/your-article-dist-path/',
    subscribe: {
        'editor.empty': function() {
            ...
        }
    }
});