+ var lang = editor.lang.clipboard;\r
+ var isCustomDomain = CKEDITOR.env.isCustomDomain();\r
+\r
+ function onPasteFrameLoad( win )\r
+ {\r
+ var doc = new CKEDITOR.dom.document( win.document ),\r
+ docElement = doc.$;\r
+\r
+ var script = doc.getById( 'cke_actscrpt' );\r
+ script && script.remove();\r
+\r
+ CKEDITOR.env.ie ?\r
+ docElement.body.contentEditable = "true" :\r
+ docElement.designMode = "on";\r
+\r
+ // IE before version 8 will leave cursor blinking inside the document after\r
+ // editor blurred unless we clean up the selection. (#4716)\r
+ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )\r
+ {\r
+ doc.getWindow().on( 'blur', function()\r
+ {\r
+ docElement.selection.empty();\r
+ } );\r
+ }\r
+\r
+ doc.on( "keydown", function( e )\r
+ {\r
+ var domEvent = e.data,\r
+ key = domEvent.getKeystroke(),\r
+ processed;\r
+\r
+ switch( key )\r
+ {\r
+ case 27 :\r
+ this.hide();\r
+ processed = 1;\r
+ break;\r
+\r
+ case 9 :\r
+ case CKEDITOR.SHIFT + 9 :\r
+ this.changeFocus( true );\r
+ processed = 1;\r
+ }\r
+\r
+ processed && domEvent.preventDefault();\r
+ }, this );\r
+\r
+ editor.fire( 'ariaWidget', new CKEDITOR.dom.element( win.frameElement ) );\r
+ }\r