Some of you may be having issues with the maximize option while running CKEditor within a jQuery dialog box. We noted several errors can occur when you have elements floating around the WYISWYG editor. We developed a very simple solution for this and thought we'd share it here to help the many others we encountered while researching the cause.
// Add an event listener to beforeCommandExec
// Maximize / Minimize command detected
// on Minimize: show hidden sibling elements and unset (minimize) detection
// on Maximize: hide sibling elements (remember which so we return state properly) and set (minimize) detection
var a_show=new Array();
Note that you need to change FIELDID to whatever value you initiated the CKEDITOR instance on. This seems like rather a simple fix, however, their API documentation made this very difficult to trace.
We, essentailly, parse the list of our editor's sibling elements, hiding & remembering those that are visible. We then set a flag for the editor (our systems can have several dozen open at any time) so that we know it's maximized. The API does not provide event listeners for any of these events (commands) and we did not want to have to hack the source. It also does not provide any means for detecting the minimize command - only maximize - hence the need to track it ourselves. Finally, when the editor is minimized, we parse the array of sibling elements we hid, showing only them, and we unset our detection flag. It's a simple solution to a common & irritating, unhandled bug.