Opened 9 years ago

Closed 9 years ago

#12926 closed Bug (wontfix)

Content formatting lost on pasting into CK Editor

Reported by: Ketan Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version:
Keywords: Cc:


On copying/pasting data from MS Word into CK Editor, if the data has specific Word Styles applied, then the formatting (alignment, bold, etc) is lost within CK Editor.

1) Copy and paste the content from attached document into CK Editor 4.3.1 (or within the CK Editor Demo website) 2) Observe that all content within the table gets left aligned. Also, few words which are 'bold' are converted to plain content.

Attachments (1)

WordStyles_Tables.docx (18.4 KB) - added by Ketan 9 years ago.
Sample document. Alignment/formatting (bold) within table gets removed on pasting to CK Editor

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by Ketan

Attachment: WordStyles_Tables.docx added

Sample document. Alignment/formatting (bold) within table gets removed on pasting to CK Editor

comment:1 Changed 9 years ago by Jakub Ś

Resolution: wontfix
Status: newclosed
Version: 4.3.1

I'm sorry but there is nothing we can do here. I have checked how browsers natively handle these styles and don't have good news.

Normally it is enough to set!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles and!/api/CKEDITOR.config-cfg-pasteFromWordRemoveStyles (sometimes some ACF configuration may be required as well) however in this case even browsers don't see the bold.
The truth is that on IE sees e.g. "Content 1" wrapped in strong tags. In all other browsers this tag is missing so there is no way to tell CKEditor that "Content 1" is in fact bold.

In this case none of the browsers (even IE) see alignment and align cell contents to the left by default. The only exception is the "$" which is aligned to the right, this information is seen by browser and editor set it properly (if two options are set).

The only solution here is stop using these Specific Word styles, as even browsers don't see them and switch to tag formatting/styling (with standard buttons).

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