Ticket #6109: 6109.patch

File 6109.patch, 2.8 KB (added by Sa'ar Zac Elias, 13 years ago)
  • _source/plugins/clipboard/dialogs/paste.js

     
    6666                        // inserted iframe editable. (#3366)
    6767                        this.parts.dialog.$.offsetHeight;
    6868
     69                        // Just for consistency (#6109).
     70                        var loadData = { 'html' : '' };
     71                        this.setupContent( loadData );
     72
    6973                        var htmlToLoad =
    7074                                '<html dir="' + editor.config.contentsLangDirection + '"' +
    7175                                ' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' +
    7276                                        '<head><style>body { margin: 3px; height: 95%; } </style></head><body>' +
    7377                                        '<script id="cke_actscrpt" type="text/javascript">' +
    7478                                        'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, this ) + ', this );' +
    75                                         '</script></body>' +
     79                                        '</script>' + loadData.html + '</body>' +
    7680                                '</html>';
    7781
    7882                        var src =
     
    166170                                editor = this.getParentEditor(),
    167171                                body = iframe.getFrameDocument().getBody(),
    168172                                bogus = body.getBogus(),
    169                                 html;
     173                                data;
    170174                        bogus && bogus.remove();
    171175                        // 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 );
    173179
    174180                        setTimeout( function(){
    175                                 editor.fire( 'paste', { 'html' : html } );
     181                                editor.fire( 'paste', data );
    176182                        }, 0 );
    177183
    178184                },
  • _source/plugins/pastetext/dialogs/pastetext.js

     
    1515
    1616                                onShow : function()
    1717                                {
    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 );
    2022                                },
    2123
    2224                                onOk : function()
    2325                                {
    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() },
    2628                                                editor = this.getParentEditor();
     29                                        this.commitContent( data );
    2730
    2831                                        setTimeout( function()
    2932                                        {
    30                                                 editor.fire( 'paste', { 'text' : text } );
     33                                                editor.fire( 'paste', data );
    3134                                        }, 0 );
    3235                                },
    3336
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy