Ticket #7304: 7304.patch
File 7304.patch, 1.7 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( 'dialog Hide', function ( evt )33 editor.on( 'dialogShow', function ( evt ) 33 34 { 34 35 evt.removeListener(); 35 resetFromWord();36 evt.data.on( 'cancel', resetFromWord ); 36 37 }); 38 39 editor.on( 'dialogHide', function( evt ) { evt.data.removeListener( 'cancel', resetFromWord ); } ); 40 41 editor.on( 'afterPaste', resetFromWord ); 37 42 } 38 43 else 39 44 resetFromWord(); -
_source/plugins/clipboard/plugin.js
322 322 else if ( data[ 'text' ] ) 323 323 editor.insertText( data[ 'text' ] ); 324 324 325 setTimeout( function () { editor.fire( 'afterPaste' ) }, 0 ); 326 325 327 }, null, null, 1000 ); 326 328 327 329 editor.on( 'pasteDialog', function( evt )