Is there a CKEditor change event that covers toolbar usage?
Is there a CKEditor event that I can hook up to that fires whenever the
content changes? Ideally I'm looking for an event that fires when anything
at all changes, so for example it could be the user typed something into
the editor, or a toolbar item was used (e.g. changed the font color).
Currently I'm just hooking up to the key event which unsurprisingly only
fires when a key is pressed, and not when for example the font color is
changed via the toolbar.
CKEDITOR.instances['myEditor'].on('key', function () {
console.log("changed");
});
I've also tried using jQuery to delegate a click event on the CKEditor's
parent like below. This partly works, for example it fires if you click
the Bolt/Italic buttons, but not if you change the font color:
$(document).on('click', '#myEditor_DISPLAY', function(){
console.log("changed");
});
I've looked at the documentation here but haven't found this event. If
there's only an event for the toolbar usage then I could make do with that
because I can just hookup to both that and the key event.
No comments:
Post a Comment