Changeset 5159
- Timestamp:
- 02/20/10 17:28:56 (3 years ago)
- Location:
- CKEditor/branches/versions/3.2.x/_source
- Files:
-
- 2 edited
-
core/tools.js (modified) (1 diff)
-
plugins/wysiwygarea/plugin.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/versions/3.2.x/_source/core/tools.js
r4858 r5159 620 620 621 621 /** 622 * Removes the function reference created with {@see CKEDITOR.tools.addFunction}. 623 * @param {Number} ref The function reference created with 624 * CKEDITOR.tools.addFunction. 625 */ 626 removeFunction : function( ref ) 627 { 628 functions[ ref ] = null; 629 }, 630 631 /** 622 632 * Executes a function based on the reference created with 623 633 * CKEDITOR.tools.addFunction. -
CKEditor/branches/versions/3.2.x/_source/plugins/wysiwygarea/plugin.js
r5151 r5159 264 264 265 265 frameLoaded = 0; 266 267 var setDataFn = !CKEDITOR.env.gecko && CKEDITOR.tools.addFunction( function( doc ) 268 { 269 CKEDITOR.tools.removeFunction( setDataFn ); 270 doc.write( data ); 271 }); 272 273 var srcScript = 274 'document.open();' + 275 276 // The document domain must be set any time we 277 // call document.open(). 278 ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) + 279 280 // With FF, it's better to load the data on 281 // iframe.load. (#3894,#4058) 282 // But in FF, we still need the open()-close() call 283 // to avoid HTTPS warnings. 284 ( CKEDITOR.env.gecko ? '' : ( 'parent.CKEDITOR.tools.callFunction(' + setDataFn + ',document);' ) ) + 285 286 'document.close();'; 266 287 267 288 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + 268 289 ' style="width:100%;height:100%"' + 269 290 ' frameBorder="0"' + 270 ( !CKEDITOR.env.webkit ? 271 // Support for custom document.domain in IE. 272 ' src="javascript:void((function(){' + 273 'document.open();' + // To avoid HTTPS warnings. 274 ( isCustomDomain ? 275 'document.domain=\'' + document.domain + '\';' : '' ) + 276 'document.close();' + 277 '})())"' : '' ) + 291 ' src="javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())"' + 278 292 ' tabIndex="' + editor.tabIndex + '"' + 279 293 ' allowTransparency="true"' + 280 294 '></iframe>' ); 281 295 282 // Register onLoad event for iframe element, which283 // will fill it with content and set custom domain.284 iframe.on( 'load', function( e )285 {286 e.removeListener(); 296 // With FF, it's better to load the data on iframe.load. (#3894,#4058) 297 CKEDITOR.env.gecko && iframe.on( 'load', function( ev ) 298 { 299 ev.removeListener(); 300 287 301 var doc = iframe.getFrameDocument().$; 288 302 289 // Custom domain handling is needed after each document.open().290 303 doc.open(); 291 if ( isCustomDomain )292 doc.domain = document.domain;293 304 doc.write( data ); 294 305 doc.close(); 295 296 306 }); 297 307 … … 311 321 var activationScript = 312 322 '<script id="cke_actscrpt" type="text/javascript" cke_temp="1">' + 313 'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' + 323 ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) + 324 'parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' + 314 325 '</script>'; 315 326
Note: See TracChangeset
for help on using the changeset viewer.
