Opened 10 years ago
Last modified 8 years ago
#13021 confirmed New Feature
Word Filter should transform mso-bidi-font-family into font-family
Reported by: | Roger Smyth | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Plugin : Paste from Word | Version: | 4.0 |
Keywords: | Cc: |
Description
I have a word document consisting of just two words "Hello to". This is actually a simplified version of the original document. The font-family for this text is Calibri (body). I don't notice any difference in formatting between these two words in the word document.
When attempting to copy and paste this text into ckeditor, the font-family of "Hello" is correctly preserved as Calibri, but the font-family of the word "to" in incorrectly changed to Arial. I don't understand why it doesn't also preserve the font-family of the "to" text.
Here is my config.js:
CKEDITOR.editorConfig = function( config ) {
config.pasteFromWordRemoveStyles = false; config.pasteFromWordRemoveFontStyles = false;
};
Here is the source HTML in ckeditor upon pasting the text:
<p><span style="font-size:10pt"><span style="font-family:calibri">Hello </span>to</span></p>
This behaviour is evident using IE 11. Please can someone assist with this?
Attachments (1)
Change History (4)
Changed 10 years ago by
Attachment: | testdoc.docx added |
---|
comment:1 Changed 10 years ago by
Status: | new → confirmed |
---|---|
Summary: | Copying and pasting from word document → Word Filter should transform mso-bidi-font-family into font-family |
Type: | Bug → New Feature |
Version: | → 4.0 |
The problem is that browsers other than IE see pasted HTML as:
<p class="MsoNoSpacing"><span style="font-size:10.0pt;mso-bidi-font-family:Calibri; mso-bidi-theme-font:minor-latin">Hello to<o:p></o:p></span></p>
Style mso-bidi-font-family is not recognized by pasted from word filter thus it is not included in final output.
IE brwosers see pasted HTML as
<p style="margin: 0cm 0cm 0pt;"><span style="font-size: 10pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><font face="Calibri">H<span style="mso-bidi-font-weight: bold;">ello </span>to</font></span></p>
There is additional font tag which paste from word filter transforms thus the end result is different.
Anyway this is a feature request and not a bug.
comment:2 Changed 8 years ago by
Milestone: | → CKEditor 4.6.1 |
---|
Putting this under consideration in 4.6.1.
comment:3 Changed 8 years ago by
Milestone: | CKEditor 4.6.1 |
---|
This is not a priority for now. Let's keep it here to allow for community feedback.
Word document that doesn't copy/paste correctly into ckeditor