Search code examples
javascripteventsdialogckeditor

How can I catch dialog tab change in CKEditor 4?


It seems there's no event triggered on dialog tab change. Is there any way to trigger some function when a dialog tab is shown/changed/clicked?

I mean the moment it's clicked or shown, but NOT just getting active tab on some dialog element change or onOk.

I'm using the latest CKEditor 4.4.5.


Solution

  • There is a dialog event "selectPage" (http://docs.ckeditor.com/#!/api/CKEDITOR.dialog-event-selectPage)

    for example:

     return {
             title : editor.lang.googlemaps.title,
             minWidth : 500,
             minHeight : 460,
             onLoad : function()
             {
                this.on('selectPage', function (e) {
                   // your code
                });
             }
    }
    

    source: http://ckeditor.com/forums/Support/How-add-selectPage-listener