- var container = this.getContentElement( 'general', 'editing_area' ).getElement(),\r
- iframe = CKEDITOR.dom.element.createFromHtml( '<iframe src="javascript:void(0)" frameborder="0" allowtransparency="1"></iframe>' );\r
-\r
- var lang = this.getParentEditor().lang;\r
+ var htmlToLoad = '<!doctype html><html><head><style>body { margin: 3px; height: 95%; } </style></head><body>' +\r
+ '<script id="cke_actscrpt" type="text/javascript">' +\r
+ 'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, this ) + ', this );' +\r
+ '</script></body></html>';\r
+\r
+ var iframe = CKEDITOR.dom.element.createFromHtml(\r
+ '<iframe' +\r
+ ' frameborder="0" ' +\r
+ ' allowTransparency="true"' +\r
+ // Support for custom document.domain in IE.\r
+ ( isCustomDomain ?\r
+ ' src="javascript:void((function(){' +\r
+ 'document.open();' +\r
+ 'document.domain=\'' + document.domain + '\';' +\r
+ 'document.close();' +\r
+ '})())"' : '' ) +\r
+ ' role="region"' +\r
+ ' aria-label="' + lang.pasteArea + '"' +\r
+ ' aria-describedby="' + this.getContentElement( 'general', 'pasteMsg' ).domId + '"' +\r
+ ' aria-multiple="true"' +\r
+ '></iframe>' );\r
+\r
+ iframe.on( 'load', function( e )\r
+ {\r
+ e.removeListener();\r
+ var doc = iframe.getFrameDocument().$;\r
+ // Custom domain handling is needed after each document.open().\r
+ doc.open();\r
+ if ( isCustomDomain )\r
+ doc.domain = document.domain;\r
+ doc.write( htmlToLoad );\r
+ doc.close();\r
+ }, this );\r