CKEditor 4.x makes it very easy to grab the contents of the textarea html:
var data = CKEDITOR.instances.editor1.getData();
...but very difficult to intercept the Save
event (or whatever happens when clicking their built-in save icon on the toolbar). By default, it does a form post. I simply want to prevent the form post and grab the contents, as in the js line above. After scouring their documentation and various stack posts -- and after trying different approaches -- it seems this basic functionality is difficult to achieve or closely guarded.
How is it done?