Opened 12 years ago
Closed 10 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)
Change History (6)
Changed 12 years ago by
Attachment: | ckeditor-bug.html added |
---|
comment:1 Changed 12 years ago by
Status: | new → pending |
---|---|
Version: | 4.1.1 |
comment:2 Changed 12 years ago by
- I can reproduce on Chrome 27 and also Safari 6.0.4
- Yes, I just checked on the nightly and it is still reproducible. Note I am using the Full version, not the Standard version.
- No special config, just using the full nightly version (and 4.1.1) as-is.
- 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 12 years ago by
Keywords: | Webkit added |
---|---|
Status: | pending → confirmed |
Version: | → 3.0 |
I have managed to reproduce this problem. There are two issues here
- Before dragging there is styled span which contains em and strong. When you drag and drop strong into em: span gets split in two, dragged tag strong ends up outside of span. Elements: new span 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.
- 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.0line-height: 1.6em;
is added to new span and strong.
- 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 strong.
comment:4 Changed 12 years ago by
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 10 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
This issue is already fixed on major by our custom DnD implementation which work around #9998 issues.
I wasn’t able to reproduce this issue in default editor.