Opened 6 years ago

Closed 5 years ago

#10515 closed Bug (fixed)

Formatting applied in CKEditor not preserved by later CKEditor instance

Reported by: zacaway Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Webkit Cc:

Description

Issue is best explained in the attached example, but basically the problem seems to be that the font plugin (included in CKEditor 4.1.1 Full) does not preserve font styling when moving text around in the editor with mixed font styles (e.g. different font sizes). In this specific example, the formatting is correct in CKEditor and saves back to the document when the editor closes, but when the editor re-opens the formatting is broken. See attached example (which includes steps to reproduce.)

Attachments (1)

ckeditor-bug.html (2.0 KB) - added by zacaway 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by zacaway

Attachment: ckeditor-bug.html added

comment:1 Changed 6 years ago by Jakub Ś

Status: newpending
Version: 4.1.1

I wasn’t able to reproduce this issue in default editor.

  1. Is there any particular browser you are getting this in?
  2. Are you able to reproduce this in demo version, nightly http://nightly.ckeditor.com/ or only in your CKEditor instance.
  3. If this occurs only in your instance then this might be happening due to some configuration option, third-party plugin or core code modification. Please check this.
  4. Could you perhaps provide screen-cast of this issue?

comment:2 Changed 6 years ago by zacaway

  1. I can reproduce on Chrome 27 and also Safari 6.0.4
  2. Yes, I just checked on the nightly and it is still reproducible. Note I am using the Full version, not the Standard version.
  3. No special config, just using the full nightly version (and 4.1.1) as-is.
  4. I've uploaded a screencast to https://dl.dropboxusercontent.com/u/24882678/CKEditorBug10515.mov

Let me know if there's anything else I can help with.

comment:3 Changed 6 years ago by Jakub Ś

Keywords: Webkit added
Status: pendingconfirmed
Version: 3.0

I have managed to reproduce this problem. There are two issues here

  1. Before dragging there is styled span which contains em and strong. When you drag and drop strong into em: span gets split in two, tags em and strong end up outside of span. All elements: new span, em and strong get main span styling (e.g. font-size:28px). This is first issue - span is split in two and style is copied to newly created elements. This part can be reproduced from CKEditor 3.0.
  1. From CKEditor 4.0 new elements receive additionally line-height: 1.6em;. This is some Webkit computed style but it wasn't added till CKE 4.0 beta. This is second issue - form CKE 4.0 line-height: 1.6em; is added to new span strong and em.
  1. This isn't really issue but in CKE 4.1 we have introduced ACF. Since it works on e.g. setData you get such result but you can get the same by simply switching to source and back. The point is - Chrome copies styles on elements which didn't register any styles to ACF thus when data is loaded ACF removes these styles and you end up with small text.

To work around this you can set allowedContent:true or add style rules to ACF for em and strong.

Version 0, edited 6 years ago by Jakub Ś (next)

comment:4 Changed 6 years ago by Piotrek Koszuliński

Issues 1 and 2 are caused by #9998 - Webkit's bug. Second one can be reproduced from CKEditor 4.0 because then we added some styling for editor contents which trigger those issues.

comment:5 Changed 5 years ago by Piotrek Koszuliński

Resolution: fixed
Status: confirmedclosed

This issue is already fixed on major by our custom DnD implementation which work around #9998 issues.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy