From 5ac400900299e9177f49c8bc81c4d4e66a85bb8c Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Wed, 21 Jun 2017 09:26:24 +0200 Subject: [PATCH 1/3] Removed JSON.stringify call so that PFW works in QM. --- plugins/pastefromword/filter/default.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pastefromword/filter/default.js b/plugins/pastefromword/filter/default.js index 44a390137a6..fdb40e73106 100644 --- a/plugins/pastefromword/filter/default.js +++ b/plugins/pastefromword/filter/default.js @@ -608,7 +608,7 @@ delete styles[ style ]; } - if ( JSON.stringify( styles ) !== '{}' ) { + if ( !CKEDITOR.tools.isEmpty( styles ) ) { element.attributes.style = CKEDITOR.tools.writeCssText( styles ); } else { delete element.attributes.style; From c39a834aa5f782ff0f48f56e2973626adebc1e68 Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Wed, 21 Jun 2017 09:51:18 +0200 Subject: [PATCH 2/3] Tests: added a manual test for pasting unordered list. [skip ci] --- .../pastefromword/manual/unorderedlist.html | 7 +++++++ .../pastefromword/manual/unorderedlist.md | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 tests/plugins/pastefromword/manual/unorderedlist.html create mode 100644 tests/plugins/pastefromword/manual/unorderedlist.md diff --git a/tests/plugins/pastefromword/manual/unorderedlist.html b/tests/plugins/pastefromword/manual/unorderedlist.html new file mode 100644 index 00000000000..a44c948277f --- /dev/null +++ b/tests/plugins/pastefromword/manual/unorderedlist.html @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/tests/plugins/pastefromword/manual/unorderedlist.md b/tests/plugins/pastefromword/manual/unorderedlist.md new file mode 100644 index 00000000000..64c896c9cc4 --- /dev/null +++ b/tests/plugins/pastefromword/manual/unorderedlist.md @@ -0,0 +1,19 @@ +@bender-tags: tc, bug, 4.7.1, 534, word +@bender-ui: collapsed +@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, pastefromword, sourcearea, elementspath, newpage, list + +## Pasting list + +1. Open [`tests/plugins/pastefromword/generated/_fixtures/Unordered_list/Unordered_list.docx`](https://github.com/ckeditor/ckeditor-dev/blob/1fb8232af13c4d536277aaff2f9a9628c3a8bbf2/tests/plugins/pastefromword/generated/_fixtures/Unordered_list/Unordered_list.docx) file in Word. +1. Select whole content. +1. Copy to clipboard. +1. Focus CKEditor. +1. Paste. + +### Expected + +List gets pasted as a `ul` list (you can see it on elements path, or in source view). + +### Unexpected + +List gets pasted as set of paragraphs / error is thrown in the console. \ No newline at end of file From 9a4b7bf2a5918e6609af701d3c4e6097357c326c Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Wed, 21 Jun 2017 10:15:17 +0200 Subject: [PATCH 3/3] Updated changelog. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index a08ae0c88ca..7f7d3b0ac5a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ Fixed Issues: * [#424](https://github.com/ckeditor/ckeditor-dev/issues/424): Fixed: Error thrown by [Tab Key Handling](http://ckeditor.com/addon/tab) and [Indent List](http://ckeditor.com/addon/indentlist) when pressing `Tab` with no selection in inline editor. * [#476](https://github.com/ckeditor/ckeditor-dev/issues/476): Fixed: Anchors inserted via [Link](http://ckeditor.com/addon/link) plugin on collapsed selection can't be edited. * [#523](https://github.com/ckeditor/ckeditor-dev/issues/523): Fixed: `editor.getCommandKeystroke` does not obtain correct keystroke. +* [#534](https://github.com/ckeditor/ckeditor-dev/issues/534): [IE] Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) does not work in Quirks Mode. ## CKEditor 4.7