Skip to content

Commit

Permalink
Merge branch 't/16653b' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Nov 16, 2016
2 parents 5c0e4a3 + cd6c240 commit 68643fd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions plugins/pastefromword/filter/default.js
Expand Up @@ -143,7 +143,7 @@
return false;
}

if ( editor && editor.config.pasteFromWordRemoveFontStyles === false && element.attributes.size ) {
if ( editor && editor.config.pasteFromWordRemoveFontStyles === true && element.attributes.size ) {
// font[size] are still used by old IEs for font size.
delete element.attributes.size;
}
Expand Down Expand Up @@ -414,7 +414,7 @@

return tools.indexOf( resetStyles, keys.join( ':' ) ) !== -1;
},
removeFontStyles = editor && editor.config.pasteFromWordRemoveFontStyles === false;
removeFontStyles = editor && editor.config.pasteFromWordRemoveFontStyles === true;

var styles = tools.parseCssText( element.attributes.style );

Expand Down Expand Up @@ -1645,7 +1645,7 @@
*
* config.pasteFromWordRemoveFontStyles = true;
*
* **Important note:** Prior to version 4.6.0 this configuration option defaulted to `false`.
* **Important note:** Prior to version 4.6.0 this configuration option defaulted to `true`.
*
* @deprecated 4.6.0 Either configure proper [Advanced Content Filter](#!/guide/dev_advanced_content_filter) for the editor
* or use the {@link CKEDITOR.editor#afterPasteFromWord} event.
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/pastefromword/generated/config.js
Expand Up @@ -12,7 +12,7 @@
bender.editor = {
config: {
language: 'en',
pasteFromWordRemoveFontStyles: false
pasteFromWordRemoveFontStyles: true
}
};

Expand Down
4 changes: 2 additions & 2 deletions tests/plugins/pastefromword/manual/configremovefont.html
Expand Up @@ -11,8 +11,8 @@

<script>
CKEDITOR.replace( 'editor1', {
pasteFromWordRemoveFontStyles: false
pasteFromWordRemoveFontStyles: true
} );

CKEDITOR.replace( 'editor2' );
</script>
</script>
6 changes: 4 additions & 2 deletions tests/plugins/pastefromword/manual/configremovefont.md
Expand Up @@ -2,7 +2,7 @@
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, basicstyles, colorbutton, font, list, table, image, pastefromword, sourcearea, elementspath

Testing [`config.pasteFromWordRemoveFontStyles`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles) set to `false`.
Testing [`config.pasteFromWordRemoveFontStyles`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles) set to `true`.

1. Paste some content from Word that contains following font styling:
* font size;
Expand All @@ -11,7 +11,9 @@ Testing [`config.pasteFromWordRemoveFontStyles`](http://docs.ckeditor.com/#!/api

You might use `Config_remove_font_styles.docx` as an example.

**Expected:** No font formatting is preserved.
**Expected:** editor 1: no font formatting is preserved.

**Expected:** editor 2: font formatting is preserved.

**Note:** It's OK to transfer styles like `text-decoration`.

Expand Down

0 comments on commit 68643fd

Please sign in to comment.