I found out that I can connect to onOk with this:
editor.on('dialogShow', function (ev) { var name = ev.data.getName(); var definition = ev.data.definition; if (name == 'image') { definition.onOk = function(e) { console.log( e ); }; } });
Surprisingly, if only now the default behavior is not canceled, as a result of which the image will not be added to the contents of CK.
Checking the source of CK , I do not want to disrupt the functionality of 74 lines by default.
My goal is simply to launch the image via a callback after adding it.
Copy / paste, change the only way to keep functionality, or is there another way?
source share