Ticket #3905: 3905.patch
File 3905.patch, 5.1 KB (added by , 15 years ago) |
---|
-
CHANGES.html
108 108 <li><a href="http://dev.fckeditor.net/ticket/3894">#3894</a> : Fixed an issue where editor failed to initialize when using the on-demand loading way.</li> 109 109 <li><a href="http://dev.fckeditor.net/ticket/3903">#3903</a> : Color button plugin doesn't read config entry from editor instance correctly.</li> 110 110 <li><a href="http://dev.fckeditor.net/ticket/3801">#3801</a> : Comments at the start of the document was lost in IE.</li> 111 <li><a href="http://dev.fckeditor.net/ticket/3879">#3879</a> : Color button panel was incorrect size on first open in webkit.</li> 111 <li><a href="http://dev.fckeditor.net/ticket/3879">#3879</a> : Color button panel was incorrect size on first open in webkit.</li> 112 <li><a href="http://dev.fckeditor.net/ticket/3905">#3905</a> : Editor caused unauthenticated content warnings over SSL in FF 3.5.</li> 112 113 </ul> 113 114 <h3> 114 115 CKEditor 3.0 RC</h3> -
_source/plugins/wysiwygarea/plugin.js
216 216 isPendingFocus, 217 217 fireMode; 218 218 219 // Support for custom document.domain in IE.220 var isCustomDomain = CKEDITOR.env.isCustomDomain();221 222 219 // Creates the iframe that holds the editable document. 223 220 var createIFrame = function() 224 221 { … … 227 224 if ( fieldset ) 228 225 fieldset.remove(); 229 226 230 // The document domain must be set within the src231 // attribute;232 // Defer the script execution until iframe233 // has been added to main window, this is needed for some234 // browsers which will begin to load the frame content235 // prior to it's presentation in DOM.(#3894)236 var src = 'void( '237 + ( CKEDITOR.env.gecko ? 'setTimeout' : '' ) + '( function(){' +238 'document.open();' +239 ( CKEDITOR.env.ie && isCustomDomain ? 'document.domain="' + document.domain + '";' : '' ) +240 'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' +241 'document.close();' +242 'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' +243 '}'244 + ( CKEDITOR.env.gecko ? ', 0 )' : ')()' )245 + ' )';246 247 // Loading via src attribute does not work in Opera.248 if ( CKEDITOR.env.opera )249 src = 'void(0);';250 251 227 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + 252 228 ' style="width:100%;height:100%"' + 253 229 ' frameBorder="0"' + 230 // Support for custom document.domain in IE. 231 ( CKEDITOR.env.isCustomDomain() ? 232 ' src="javascript:void((function(){' + 233 'document.open();' + 234 'document.domain=\'' + document.domain + '\';' + 235 'document.close();' + 236 '})())"' : '' ) + 254 237 ' tabIndex="-1"' + 255 238 ' allowTransparency="true"' + 256 ' src="javascript:' + encodeURIComponent( src ) + '"' +257 239 '></iframe>' ); 258 240 241 // Register onLoad event for iframe element, which 242 // will fill it with content and set custom domain. 243 var onLoad = function( e ) 244 { 245 iframe.removeListener( 'load', onLoad ); 246 var doc = iframe.getFrameDocument().$; 247 248 // Custom domain handling is needed after document.open(). 249 doc.open(); 250 if ( CKEDITOR.env.isCustomDomain() ) 251 doc.domain = document.domain; 252 253 doc.write( CKEDITOR._[ 'cke_htmlToLoad_' + editor.name ] ); 254 CKEDITOR._[ 'cke_htmlToLoad_' + editor.name ] = null; 255 256 doc.close(); 257 }; 258 iframe.on( 'load', onLoad ); 259 259 260 var accTitle = editor.lang.editorTitle.replace( '%1', editor.name ); 260 261 261 262 if ( CKEDITOR.env.gecko ) … … 301 302 // enables editing, and makes some 302 303 var activationScript = 303 304 '<script id="cke_actscrpt" type="text/javascript">' + 304 'window.onload = function()' +305 '{' +306 305 // Remove this script from the DOM. 307 306 'var s = document.getElementById( "cke_actscrpt" );' + 308 307 's.parentNode.removeChild( s );' + … … 310 309 // Call the temporary function for the editing 311 310 // boostrap. 312 311 'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' + 313 '}' +314 312 '</script>'; 315 313 316 314 // Editing area bootstrap code. … … 504 502 '</html>' + 505 503 activationScript; 506 504 507 window[ '_cke_htmlToLoad_' + editor.name ] = data;505 CKEDITOR._[ 'cke_htmlToLoad_' + editor.name ] = data; 508 506 CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady; 509 507 createIFrame(); 510 511 // Opera must use the old method for loading contents.512 if ( CKEDITOR.env.opera )513 {514 var doc = iframe.$.contentWindow.document;515 doc.open();516 doc.write( data );517 doc.close();518 }519 508 }, 520 509 521 510 getData : function()