Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#14660 closed Bug (fixed)

Pasting text from MS Word "breaks" styling in some cases

Reported by: Hakan Gündüz Owned by: Marek Lewandowski
Priority: Normal Milestone: CKEditor 4.6.0
Component: Plugin : Paste from Word Version:
Keywords: Cc:


Steps to reproduce

  1. Open new Word document
  2. Write some text
  3. Set font size to 36
  4. Mark text with yellow marker tool
  5. copy & paste this text into ckeditor (prerequirement: config.pasteFromWordRemoveFontStyles & config.pasteFromWordRemoveStyles are set to FALSE)
  6. see that yellow marking is only half the height of the text
  7. happens because the plugin puts background-color and font-size not in the same but cascaded <SPAN> tags. So outer span doesn't now anything about the inner.
  8. Dirty workaround is to comment out the lines 950-952 in ckeditor\plugins\pastefromword\filter\default.js

Expected result

yellow background is as height as the text

<span style="background: yellow; font-size: 36pt">myTXT</span>

Actual result

yellow background is only half the height of its text

<span style="background: yellow;"><span style="font-size: 36pt">myTXT</span></span>

See attachment

Other details (browser, OS, CKEditor version, installed plugins)

browser: firefox 29, windows 7, CKEditor version: 4.5.7, Paste From Word version: 4.4.8

Attachments (1)

word-issue.PNG (63.6 KB) - added by Hakan Gündüz 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Hakan Gündüz

Attachment: word-issue.PNG added

comment:1 Changed 8 years ago by Jakub Ś

Component: GeneralPlugin : Paste from Word
Keywords: pastefromword removed
Milestone: CKEditor 4.6.0
Status: newconfirmed
Version: 4.5.7

This issue is part of the larger one #9991; has been fixed (it is working on branch t\9991) and will be intorduced with CKEditor 4.6.

NOTE: We also have similar issue with styles - #5503.

comment:2 Changed 7 years ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: confirmedreview

comment:3 Changed 7 years ago by Marek Lewandowski

Resolution: fixed
Status: reviewclosed

It's fixed by #9991. Though structure was good already in 4.5.x, the marker for 3rd level list was wrong - and it has been fixed.

Fixed with git:f2af0353f8fb20231c7ca6de080c6cad273195eb merged to major.

Version 0, edited 7 years ago by Marek Lewandowski (next)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy