Index: _source/plugins/panel/plugin.js =================================================================== --- _source/plugins/panel/plugin.js (revision 3268) +++ _source/plugins/panel/plugin.js (working copy) @@ -114,6 +114,29 @@ var className = iframe.getParent().getParent().getAttribute( 'class' ); + var win = doc.getWindow(); + + // Register the CKEDITOR global. + win.$.CKEDITOR = CKEDITOR; + + win.on( 'load', function( ev ) + { + if( CKEDITOR.env.ff2 ) + { + var i, l = this.css.length; + for ( i = 0; i < l; i++ ) { + doc.appendStyleSheet( this.css[ i ] ); + } + } + // TODO: Examine stylesheet ready state instead of hard-coded timeout. + CKEDITOR.tools.setTimeout( function(){ + this.isLoaded = true; + if ( this.onLoad ) + this.onLoad(); + }, CKEDITOR.env.ff2? 100 : 0, this ); + }, + this); + // Initialize the IFRAME document body. doc.$.open(); doc.$.write( @@ -120,7 +143,9 @@ '' + '' + '
' + - '' + + // Styles loading come later for Firefox 2 + ( !CKEDITOR.env.ff2? '' : '' )+ '' + '' + '' + @@ -128,19 +153,6 @@ '<\/html>' ); doc.$.close(); - var win = doc.getWindow(); - - // Register the CKEDITOR global. - win.$.CKEDITOR = CKEDITOR; - - win.on( 'load', function( ev ) - { - this.isLoaded = true; - if ( this.onLoad ) - this.onLoad(); - }, - this); - doc.on( 'keydown', function( evt ) { var keystroke = evt.data.getKeystroke(); @@ -298,3 +310,6 @@ } } }); + +// Firefox2.x version detect. +CKEDITOR.env.ff2 = CKEDITOR.env.gecko && CKEDITOR.env.version < 109000;