Ticket #6109: 6109.patch
File 6109.patch, 2.8 KB (added by , 14 years ago) |
---|
-
_source/plugins/clipboard/dialogs/paste.js
66 66 // inserted iframe editable. (#3366) 67 67 this.parts.dialog.$.offsetHeight; 68 68 69 // Just for consistency (#6109). 70 var loadData = { 'html' : '' }; 71 this.setupContent( loadData ); 72 69 73 var htmlToLoad = 70 74 '<html dir="' + editor.config.contentsLangDirection + '"' + 71 75 ' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' + 72 76 '<head><style>body { margin: 3px; height: 95%; } </style></head><body>' + 73 77 '<script id="cke_actscrpt" type="text/javascript">' + 74 78 'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, this ) + ', this );' + 75 '</script> </body>' +79 '</script>' + loadData.html + '</body>' + 76 80 '</html>'; 77 81 78 82 var src = … … 166 170 editor = this.getParentEditor(), 167 171 body = iframe.getFrameDocument().getBody(), 168 172 bogus = body.getBogus(), 169 html;173 data; 170 174 bogus && bogus.remove(); 171 175 // Saving the contents in variable so changes until paste is complete will not take place (#7500) 172 html = body.getHtml(); 176 // Pass through commitContent for consistency (#6109). 177 data = { 'html' : body.getHtml() }; 178 this.commitContent( data ); 173 179 174 180 setTimeout( function(){ 175 editor.fire( 'paste', { 'html' : html });181 editor.fire( 'paste', data ); 176 182 }, 0 ); 177 183 178 184 }, -
_source/plugins/pastetext/dialogs/pastetext.js
15 15 16 16 onShow : function() 17 17 { 18 // Reset the textarea value. 19 this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' ); 18 // Reset the textarea value. Pass through setupContent for consistency (#6109). 19 var data = { text : '' }; 20 this.setupContent( data ); 21 this.getContentElement( 'general', 'content' ).getInputElement().setValue( data.text ); 20 22 }, 21 23 22 24 onOk : function() 23 25 { 24 // Get the textarea value. 25 var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(),26 // Get the textarea value. Pass through commitContent for consistency (#6109). 27 var data = { text : this.getContentElement( 'general', 'content' ).getInputElement().getValue() }, 26 28 editor = this.getParentEditor(); 29 this.commitContent( data ); 27 30 28 31 setTimeout( function() 29 32 { 30 editor.fire( 'paste', { 'text' : text });33 editor.fire( 'paste', data ); 31 34 }, 0 ); 32 35 }, 33 36