Skip to content

Commit

Permalink
Merge pull request #537 from ckeditor/t/534
Browse files Browse the repository at this point in the history
Removed JSON.stringify call so that PFW works in QM
  • Loading branch information
Comandeer authored Jun 21, 2017
2 parents 1fb8232 + 9a4b7bf commit feeee48
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion plugins/pastefromword/filter/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions tests/plugins/pastefromword/manual/unorderedlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<textarea cols="80" id="editor1" name="editor1" rows="10">
<p>Paste here:</p>
<p></p>
</textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
19 changes: 19 additions & 0 deletions tests/plugins/pastefromword/manual/unorderedlist.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit feeee48

Please sign in to comment.