I want to add a listener of selectPage event to my CKEditor plugin, but so far I'm unable to get it to work. The plugin works fine but my listener is not working. The alert below never gets called.
The code:
Is there something I'm doing wrong?
The code:
var dialog = function(editor) { editor.on('selectPage', function(e) { alert("Page changed"); }); // rest of the plugin code }
Is there something I'm doing wrong?
Re: How to add a selectPage listener?
is an event of a dialog instance, it will not fire on the editor itself.
Re: How to add a selectPage listener?
I've tried it the following ways, but it won't work
and
Re: How to add a selectPage listener?
You can get the real object for example by using an onLoad function:
The trick there is that when that onLoad is executed, it will be done on the real dialog, so "this" will work.
Re: How to add a selectPage listener?