Documentation

Editor

editor.before.load

Arguments
html StringSource content of the editor.

Occurs before the editor starts.

RedactorX('#entry', {
    subscribe: {
        'editor.before.load': function(event) {
            ...
        }
    }
});

editor.load

Arguments
html StringSource content of the editor.

Occurs when the editor is started.

RedactorX('#entry', {
    subscribe: {
        'editor.load': function(event) {
            ...
        }
    }
});

editor.before.change

Arguments
html StringContent of the editor.

Occurs before syncing content with the source textarea.

RedactorX('#entry', {
    subscribe: {
        'editor.before.change': function(event) {
            ...
        }
    }
});

editor.change

Arguments
html StringContent of the editor.

Occurs whenever the editor synchronizes content with the source textarea.

RedactorX('#entry', {
    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.

RedactorX('#entry', {
    subscribe: {
        'editor.insert': function(event) {
            ...
        }
    }
});

editor.before.parse

Arguments
html StringContent of the editor.

Occurs before parsing content.

RedactorX('#entry', {
    subscribe: {
        'editor.before.parse': function(event) {
            ...
        }
    }
});

editor.parse

Arguments
html StringContent of the editor.

Occurs whenever the content is parsed.

RedactorX('#entry', {
    subscribe: {
        'editor.parse': function(event) {
            ...
        }
    }
});

editor.before.unparse

Arguments
html StringContent of the editor.

Occurs before unparsing content.

RedactorX('#entry', {
    subscribe: {
        'editor.before.unparse': function(event) {
            ...
        }
    }
});

editor.unparse

Arguments
html StringContent of the editor.

Occurs whenever the content is unparsed.

RedactorX('#entry', {
    subscribe: {
        'editor.unparse': function(event) {
            ...
        }
    }
});

editor.focus

Occurs whenever the editor gets focus.

RedactorX('#entry', {
    subscribe: {
        'editor.focus': function() {
            ...
        }
    }
});

editor.blur

Occurs whenever the editor loses focus.

RedactorX('#entry', {
    subscribe: {
        'editor.blur': function() {
            ...
        }
    }
});

editor.click

Arguments
e ObjectEvent object

Occurs whenever a block in the editor is clicked.

This event has event.stop method.

RedactorX('#entry', {
    subscribe: {
        'editor.click': function(event) {
            ...
        }
    }
});

editor.mouseover

Arguments
e ObjectEvent object

Occurs whenever a block in the editor is hovered.

RedactorX('#entry', {
    subscribe: {
        'editor.mouseover': function(event) {
            ...
        }
    }
});

editor.mouseup

Arguments
e ObjectEvent object

Occurs whenever the editor has a mouseup event

RedactorX('#entry', {
    subscribe: {
        'editor.mouseup': function(event) {
            ...
        }
    }
});

editor.mousedown

Arguments
e ObjectEvent object

Occurs whenever the editor has a mousedown event

RedactorX('#entry', {
    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.

RedactorX('#entry', {
    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.

RedactorX('#entry', {
    subscribe: {
        'editor.keyup': function(event) {
            ...
        }
    }
});

editor.drop

Arguments
e ObjectEvent object

Occurs whenever the editor has a drop event.

RedactorX('#entry', {
    subscribe: {
        'editor.drop': function(event) {
            ...
        }
    }
});

editor.dragstart

Arguments
e ObjectEvent object

Occurs whenever the editor has a dragstart event.

RedactorX('#entry', {
    subscribe: {
        'editor.dragstart': function(event) {
            ...
        }
    }
});

editor.dragover

Arguments
e ObjectEvent object

Occurs whenever the editor has a dragover event.

RedactorX('#entry', {
    subscribe: {
        'editor.dragover': function(event) {
            ...
        }
    }
});

editor.dragleave

Arguments
e ObjectEvent object

Occurs whenever the editor has a dragleave event.

RedactorX('#entry', {
    subscribe: {
        'editor.dragleave': function(event) {
            ...
        }
    }
});

editor.before.cut

Arguments
eObjectEvent object
html StringCut content.

Occurs before the cut event. This event has event.stop method.

RedactorX('#entry', {
    subscribe: {
        'editor.before.cut': function(event) {
            // get cut html
            var html = event.get('html');

            // return html back
            event.set('html', html);
        }
    }
});

editor.cut

Arguments
html StringThe cut html code

Occurs whenever the editor has a cut event.

RedactorX('#entry', {
    subscribe: {
        'editor.cut': function(event) {
            ...
        }
    }
});

editor.before.copy

Arguments
eObjectEvent object
html StringCopied content.

Occurs before the copy event. This event has event.stop method.

RedactorX('#entry', {
    subscribe: {
        'editor.before.copy': function(event) {
            // get copied html
            var html = event.get('html');

            // return html back
            event.set('html', html);
        }
    }
});

editor.copy

Arguments
html StringThe copied html code

Occurs whenever the editor has a copy event.

RedactorX('#entry', {
    subscribe: {
        'editor.copy': function(event) {
            ...
        }
    }
});

editor.before.paste

Arguments
eObjectEvent object
html StringPasted content.

Occurs before the paste event. This event has event.stop method.

RedactorX('#entry', {
    subscribe: {
        'editor.before.paste': function(event) {
            // get pasted html
            var html = event.get('html');

            // return html back
            event.set('html', html);
        }
    }
});

editor.paste

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

Occurs whenever the editor has a paste event.

RedactorX('#entry', {
    subscribe: {
        'editor.paste': function(event) {
            ...
        }
    }
});

editor.empty

Occurs whenever the editor is empty.

RedactorX('#entry', {
    subscribe: {
        'editor.empty': function() {
            ...
        }
    }
});