#12243 closed Bug (fixed)
Pasting from a Word (type) document loses formatting
Reported by: | Alin Purcaru | Owned by: | Olek Nowodziński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.4 |
Component: | Plugin : Paste from Word | Version: | |
Keywords: | Cc: |
Description
Description:
When pasting from MS Word, Libre/Open Office documents some of the formatting is lost. Upon checking the HTML generated it can be observed that the style attribute has incorrectly separated definition (missing ';').
Steps to reproduce:
- Use the attached test.odt as a sample (although the problem can be reproduced with other formats too).
- Click on the Paste from Word button (you will observe that the formatting is kept at this point).
- Click OK.
- Part of the formatting (in this case the text color for the first paragraph) is lost.
System details:
Ubuntu 14.04, Chrome 35
CKEditor instance config:
CKEDITOR.inline( ... , { ... allowedContent: true, pasteFromWordRemoveFontStyles: false, pasteFromWordRemoveStyles: false });
Note: I have already found the problem and fixed it and will create a pull request for ckeditor/ckeditor-dev on github. I'm posting this bug to have it as reference.
Attachments (1)
Change History (7)
Changed 10 years ago by
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Owner: | set to Olek Nowodziński |
---|---|
Status: | new → assigned |
comment:3 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I reviewed this PR, which appears to be good. We should not concatenate strings while dealing with styles though. I improved the fix to avoid similar issues in the future.
git:88898049 merged into master.
comment:4 Changed 10 years ago by
Milestone: | → CKEditor 4.4.4 |
---|---|
Version: | 4.4.4 (GitHub - master) |
comment:5 Changed 10 years ago by
As for working with styles we've got a pretty good parser and writer in CKEDITOR.tools. But of course it's hard to start using them everywhere now.
comment:6 Changed 10 years ago by
Summary: | Pasting from a Word (type) document looses formatting → Pasting from a Word (type) document loses formatting |
---|
Pull request with the fix: https://github.com/ckeditor/ckeditor-dev/pull/117