Monday, January 24, 2011

CKEditor

Wow, events in CKEditor are sometimes hard to decipher. For example: why does the dialog not close when the 'Ok' event is fired on a dialog?

Well, the ok event is not responsible for hiding the editor. That is something the ok-button.onClick() does. So, if you want to simulate hide the dialog as if the ok button was clicked, do the following:



if(dialog.fire('ok', {hide:true}).hide !== false) {
  dialog.hide();
}

No comments:

Post a Comment