X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpastefromword%2Fplugin.js;h=d50b3f058d281b2fa7acc90c832778d3d2dd771a;hb=614511639979907ceb0da3614122a4d8eb963ad4;hp=2e0b3d402d6c99d3e10f16946d93ec6741a89501;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/pastefromword/plugin.js b/_source/plugins/pastefromword/plugin.js index 2e0b3d4..d50b3f0 100644 --- a/_source/plugins/pastefromword/plugin.js +++ b/_source/plugins/pastefromword/plugin.js @@ -27,7 +27,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license exec : function() { forceFromWord = 1; - if( editor.execCommand( 'paste' ) === false ) + if ( editor.execCommand( 'paste' ) === false ) { editor.on( 'dialogHide', function ( evt ) { @@ -35,6 +35,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license resetFromWord(); }); } + else + resetFromWord(); } }); @@ -59,7 +61,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Event continuation with the original data. if ( isLazyLoad ) editor.fire( 'paste', data ); - else if( !editor.config.pasteFromWordPromptCleanup + else if ( !editor.config.pasteFromWordPromptCleanup || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) ) { data[ 'html' ] = CKEDITOR.cleanWord( mswordHtml, editor ); @@ -96,8 +98,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license })(); /** - * Whether prompt the user about the clean-up of content from MS-Word. + * Whether to prompt the user about the clean up of content being pasted from + * MS Word. * @name CKEDITOR.config.pasteFromWordPromptCleanup + * @since 3.1 * @type Boolean * @default undefined * @example @@ -105,9 +109,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license */ /** - * The file that provides the MS-Word Filtering rules. - * Note: It's a global configuration which are shared by all editor instances. + * The file that provides the MS Word cleanup function for pasting operations. + * Note: This is a global configuration shared by all editor instances present + * in the page. * @name CKEDITOR.config.pasteFromWordCleanupFile + * @since 3.1 * @type String * @default 'default' * @example