Search code examples
javascriptckeditor

How to detect CKEditor source mode on change event


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("ckeditor on change");
});

But if I switch over to the source mode, the event does not fire.

How can I detect the on change event for source view?


Solution

  • Instead of using "change" event, the "key" event does fire on the source view.

    Thanks for Kicker's hint