Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#13860 closed Bug (duplicate)

[Chrome] Text formatting like text color or background color are removed on copy&paste

Reported by: Marc Nilius Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.0 Beta
Keywords: Blink Webkit Cc:

Description

Text formattings that are done with span elements like text color and background-color are removed, if one copies the text from one CKEditor to another. It worked in older versions of CKEditor, at least in 4.4.8. You can reproduce the issue also on the demo page of CKEditor.

Steps to reproduce

  1. Open the CKEditor full-featured demo in two tabs
  2. Add some text color and background color to a part of the text in the first tab.
  3. Copy that text into the clipboard
  4. Paste the text again in the editor on the second tab.

Expected result

Text color and background color formatting should still be there, like any other formatting like bold or italics.

Actual result

Text color and background color formattings are removed (because the span element for the style definition is removed), other formattings like bold and italics are still there. As I understand, the ACF is by default allowing these elements and styles and should not remove them.

I saw that Chrome sometimes adds the color in the style attribute as rgb(x,y,z) instead of #color, perhaps this is the problem for the ACF.

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

Reproduced in latest Chrome (46, Windows). I cannot reproduce this issue in Firefox (41, Windows).

Change History (6)

comment:1 Changed 3 years ago by Jakub Ś

Keywords: Blink Webkit added
Status: newconfirmed
Version: 4.5.44.5.0 Beta

Problem can be reproduced from CKEditor 4.5.0 in Blink and Webkit browsers.

comment:2 Changed 3 years ago by Marc Nilius

Any news on this issue?

For us, this is a major issue, because our customers often use text and background color formattings and also often copy HTML content (that was created with CKEditor) in a new CKEditor instance.

Would be nice, if this could be fixed.

Thanks in advance, Marc

comment:3 Changed 3 years ago by Jakub Ś

There are no plans to fix it in the nearest release but I will forward it to my colleagues asking if we could include it in one of future ones.

comment:4 Changed 3 years ago by Jakub Ś

Cc: chrisgui Irina added
Keywords: IBM added

#14593 was marked as duplicate.

Last edited 3 years ago by Jakub Ś (previous) (diff)

comment:5 Changed 3 years ago by Jakub Ś

It turns out we have quite a few issues with pasting and they all may be related:
Styles Stripping: #13860, #13926, #14250, #14358
The forcePasteAsPlainText not stripping styles: #13969, #14293
Weird event pasting relation (not sure): #13763
Problem with pasting in LibreOffice: #14622 (we do not support it but I have added this issue because general solution might also bring back old behaviour).

Last edited 3 years ago by Jakub Ś (previous) (diff)

comment:6 Changed 3 years ago by Jakub Ś

Cc: chrisgui Irina removed
Keywords: IBM removed
Resolution: duplicate
Status: confirmedclosed

It turned out this ticket is a subset of #14593 thus i will close this one as a duplicate.

@zottto, please refer to #14593.

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