Opened 8 months ago

Closed 3 months ago

Last modified 3 months ago

#14660 closed Bug (fixed)

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

Reported by: flowfacthag Owned by: m.lewandowski
Priority: Normal Milestone: CKEditor 4.6.0
Component: Plugin : Paste from Word Version:
Keywords: Cc:

Description

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 flowfacthag 8 months ago.

Download all attachments as: .zip

Change History (4)

Changed 8 months ago by flowfacthag

comment:1 Changed 7 months ago by j.swiderski

  • Component changed from General to Plugin : Paste from Word
  • Keywords pastefromword removed
  • Milestone set to CKEditor 4.6.0
  • Status changed from new to confirmed
  • Version 4.5.7 deleted

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 3 months ago by m.lewandowski

  • Owner set to m.lewandowski
  • Status changed from confirmed to review

comment:3 Changed 3 months ago by m.lewandowski

  • Resolution set to fixed
  • Status changed from review to closed

It's fixed by #9991.

Fixed with git:f2af0353f8fb20231c7ca6de080c6cad273195eb merged to major.

Last edited 3 months ago by m.lewandowski (previous) (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy