Opened 10 years ago
Closed 10 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: |
Description
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)
Change History (2)
Changed 10 years ago by
Attachment: | WordStyles_Tables.docx added |
---|
comment:1 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
Bold:
Normally it is enough to set http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles and http://docs.ckeditor.com/#!/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.
Alignment:
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).
Sample document. Alignment/formatting (bold) within table gets removed on pasting to CK Editor