Ticket #4905: 4905.patch

File 4905.patch, 1.3 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/pastetext/plugin.js

     
    112112
    113113        CKEDITOR.editor.prototype.insertText = function( text )
    114114        {
     115                this.focus();
    115116                this.fire( 'saveSnapshot' );
    116117
    117118                var mode = this.getSelection().getStartElement().hasAscendant( 'pre', true ) ? CKEDITOR.ENTER_BR : this.config.enterMode,
  • _source/plugins/pastetext/dialogs/pastetext.js

     
    2222                                onOk : function()
    2323                                {
    2424                                        // Get the textarea value.
    25                                         var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue();
    26                                         this.getParentEditor().fire( 'paste', { 'text' : text } );
     25                                        var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(),
     26                                                editor = this.getParentEditor();
     27
     28                                        setTimeout( function()
     29                                        {
     30                                                editor.fire( 'paste', { 'text' : text } );
     31                                        }, 0 );
    2732                                },
    2833
    2934                                contents :
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy