Opened 5 years ago

Last modified 3 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)

testdoc.docx (13.4 KB) - added by Roger Smyth 5 years ago.
Word document that doesn't copy/paste correctly into ckeditor

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by Roger Smyth

Attachment: testdoc.docx added

Word document that doesn't copy/paste correctly into ckeditor

comment:1 Changed 5 years ago by Jakub Ś

Status: newconfirmed
Summary: Copying and pasting from word documentWord Filter should transform mso-bidi-font-family into font-family
Type: BugNew 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 3 years ago by Tade0

Milestone: CKEditor 4.6.1

Putting this under consideration in 4.6.1.

comment:3 Changed 3 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.1

This is not a priority for now. Let's keep it here to allow for community feedback.

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