Opened 12 years ago

Closed 10 years ago

#8722 closed Bug (fixed)

[FF, Webkit]: ForeAsPlainText splits span tags

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 3.5
Keywords: Firefox, Webkit Cc:


To reproduce:

  1. Paste the below code in CKEditor
    <span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">This is </span></span>
  2. Paste the below code into console or use PasteAsPlainText plugin
    CKEDITOR.instances.editor1.insertText("Hello, world");
  3. Put cursor here: Th^is is
  4. Execute console command or use PasteAsPlainText plugin.

Firefox and Chrome split each section in separate spans whereas IE and Opera do the expected and join all together. Safari drops formatting.

IE and Opera OK-

	<span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">ThHellois is </span></span></p>

Firefox -

	<span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">Th</span></span><span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">Hello, world</span></span><span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">is is </span></span></p>

Chrome -

	<span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">Th</span></span><span style="font-family: arial, helvetica, sans-serif; ">Hello, world</span><span style="font-family: arial, helvetica, sans-serif; ">is is</span></p>

Note also that Chrome drops font-size if it is default 12px. If you use font-size E.g 13 you will get spans like: <span style="font-family: arial, helvetica, sans-serif; font-size: 13px;">

Safari -

	<span style="font-size: 12px;"><span style="font-family: arial,helvetica,sans-serif;">Th</span></span>Hello, worldis is</p>

All issues have been reproducible from CKEditor 3.5. Before this version text was pasted without any formatting. From 3.5 there is an improvement but there is still something missing.

Exception is the Safari where it seems that this particular part was working till CKE 3.4.3 and was broken in CKE 3.5.

Change History (2)

comment:1 Changed 12 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 10 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

This is no longer an issue in latest CKEditor 4.1.2. I haven't observed such splitting in any browser.

Please note that if in any case you get some sort of splitting when pasting pure text you might want to check!/api/CKEDITOR.config-cfg-clipboard_defaultContentType and set it to text.

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