Ticket #7304: 7304_3.patch
File 7304_3.patch, 2.0 KB (added by , 13 years ago) |
---|
-
_source/plugins/pastefromword/plugin.js
12 12 // Flag indicate this command is actually been asked instead of a generic 13 13 // pasting. 14 14 var forceFromWord = 0; 15 var resetFromWord = function( )15 var resetFromWord = function( evt ) 16 16 { 17 setTimeout( function() { forceFromWord = 0; }, 0 ); 17 evt && evt.removeListener(); 18 forceFromWord && setTimeout( function() { forceFromWord = 0; }, 0 ); 18 19 }; 19 20 20 21 // Features bring by this command beside the normal process: … … 29 30 forceFromWord = 1; 30 31 if ( editor.execCommand( 'paste' ) === false ) 31 32 { 32 editor.on( 'dialogHide', function ( evt ) 33 { 34 evt.removeListener(); 35 resetFromWord(); 36 }); 33 editor.on( 'dialogShow', function ( evt ) 34 { 35 evt.removeListener(); 36 evt.data.on( 'cancel', resetFromWord ); 37 }); 38 39 editor.on( 'dialogHide', function( evt ) 40 { 41 evt.data.removeListener( 'cancel', resetFromWord ); 42 } ); 37 43 } 38 else 39 resetFromWord();44 45 editor.on( 'afterPaste', resetFromWord ); 40 46 } 41 47 }); 42 48 -
_source/plugins/clipboard/plugin.js
327 327 else if ( data[ 'text' ] ) 328 328 editor.insertText( data[ 'text' ] ); 329 329 330 setTimeout( function () { editor.fire( 'afterPaste' ) }, 0 ); 331 330 332 }, null, null, 1000 ); 331 333 332 334 editor.on( 'pasteDialog', function( evt ) … … 393 395 { 394 396 // The very last guard to make sure the 395 397 // paste has successfully happened. 396 if ( ! data)398 if ( !CKEDITOR.tools.trim( data ) ) 397 399 return; 398 400 399 401 var dataTransfer = {};