Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed JSON.stringify call so that PFW works in QM #537

Merged
merged 3 commits into from
Jun 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.