Opened 7 years ago

Last modified 7 years ago

#16710 confirmed Bug

Font-familly gets pasted pasted from MS Word with "

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 4.6.0
Keywords: Cc:

Description

Steps to reproduce

  1. Open attached Word file
  2. Copy contents and paste it into CKEditor 4.6 and 4.5.11.
    NOTE: 4.5.11 requires:
    pasteFromWordRemoveFontStyles : false,
    pasteFromWordRemoveStyles : false
    

Expected result

This is the result from 4.5.11

<p><span style="font-family:Arial,sans-serif"><span style="font-size:8.0pt">TEST</span></span></p>

Actual result

This is the result in 4.6.0. Notice extra &quot; around font name.

<p><span style="font-size:8.0pt"><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">TEST</span></span></p>

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

Problem can be reproduced from CKEditor 4.6.0 in all browsers.

Attachments (1)

TEST.docx (12.7 KB) - added by Jakub Ś 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Jakub Ś

Attachment: TEST.docx added

comment:1 Changed 7 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 7 years ago by Jakub Ś

These are the results taken from browsers:

//FF:
<p class="MsoNormal"><span style="font-size:8.0pt;line-height:115%;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-bidi;mso-hansi-theme-font:
minor-bidi;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:PL" lang="PL">test</span></p>
//IE11
<p style="margin: 0cm 0cm 10pt;"><span lang="PL" style='line-height: 115%; font-family: "Arial","sans-serif"; font-size: 8pt; mso-ascii-theme-font: minor-bidi; mso-hansi-theme-font: minor-bidi; mso-bidi-font-family: Arial; mso-bidi-theme-font: minor-bidi; mso-ansi-language: PL;'>TEST</span></p>
//Chrome
<p class="MsoNormal"><span lang="PL" style="font-size:8.0pt;line-height:115%;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;mso-ascii-theme-font:minor-bidi;mso-hansi-theme-font:
minor-bidi;mso-bidi-font-family:Arial;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:PL">TEST<o:p></o:p></span></p>
//Edge
<p style="margin: 0px 0px 13px;"><span lang="PL" style='margin: 0px; line-height: 115%; font-family: "Arial","sans-serif"; font-size: 8pt;'>TEST</span></p>

As you can see all browsers add extra quotation around font-names so I'm really not sure which is better - leaving it or filtering it like previous versions were doing.

It makes sense for leaving them for fonts like "Times New Roman" or even all fonts if it is working but we also need some standard way to display these fonts in dropdowns. Font from dropdown should match font in editor. I'm afraid that these extra " or &quot will break that.

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