In CKEditor, I know that in the \"normal mode\", we can detect any content change using the following code:
ckeditor.on(\'change\',function(e){
console.log(\"c
The CKEditor 4 documentation tells that the change event won't be fired in source mode.
The example from the documentation worked for me. It binds a listener to the mode event. That's fired when the mode changes. When it changes to source, attach a listener to the editor.
editor.on('mode', function() {
if (this.mode === 'source') {
var editable = editor.editable();
editable.attachListener(editable, 'input', function() {
// Handle changes made in the source mode.
});
}
});