Opened 3 years ago

Last modified 3 years ago

#14923 confirmed Bug

Copy paste from word does not retain font size for first <li> tag

Reported by: Sibasish palo Owned by:
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version:
Keywords: Cc:

Description

Steps to reproduce

  1. create a ordered list in MS word.
  2. copy & paste the content into ckeditor,after applying the filter its modifying the content as follows:

<ol>
<li style="font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 0pt;">Test1</li>

<li style="color: rgb(0, 0, 0); font-family: Calibri,sans-serif; font-size: 11pt; font-style: normal; font-weight: normal; margin-top: 0in; margin-bottom: 10pt;">Sdfas</li>

</ol>

  1. As you can see its not retaining the font size for the first <li> tag

Expected result

it should retain the font size for the first li item

Actual result

removing the font size from the 1st li tag

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

reproducible in IE

Attachments (1)

test list.docx (15.4 KB) - added by Jakub Ś 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by Jakub Ś

Status: newconfirmed
Version: 4.5.7

Below are my results of pasting attached test file into CKEditor with old and new PFW filter. For my tests I have also used below editor settings:

var editor = CKEDITOR.replace( 'editor1', {
	extraAllowedContent : 'ul[*]{*}(*);li[*]{*}(*);ol[*]{*}(*)',
	pasteFromWordRemoveFontStyles : false,
	pasteFromWordRemoveStyles : false
});

Results:

Chrome:
Old PFW:

  • For the default list clean tags get pasted without any extra styles.
  • For the list with size 14 all elements have font-size:14.0pt retained. These are bugs but will be fixed by new PFW filter.

New PFW:

  • For the default list there is no font-size but there are extra styles and classes.
  • For the list with size 14 all elements have font-size:14.0pt retained (plus other styles and classes).

Firefox:
Old PFW:

  • For the default list, the list is pasted with no values.
  • For the list with size 14 only the last element font-size:14.0pt retained. First two are empty.

New PFW:

  • For the default list there is no font-size but there are extra styles and classes.
  • For the list with size 14 all elements have font-size:14.0pt retained (plus other styles and classes). Result is the same as in Chrome.

IE11:
Old PFW:

  • For the default list the span with font-size:11.0pt is not retained for first element.
  • For the list with size 14 the first element has size font-size:14.0pt retained but other two have font-size:11.0pt.
  • Additionally for first element in both cases these styles are missing color: rgb(0, 0, 0); font-family: Calibri,sans-serif; thus first item is looking different in wysiwyg mode.

New PFW:

  • For the default list the font-size:11.0pt is not retained for first element.
  • For the list with size 14 the all elements have size font-size:14.0pt retained.
  • Additionally for first element in both cases these spans are missing "><span style="color:rgb(0, 0, 0)"><span style="font-family:calibri,sans-serif"> thus itfirst item is looking different in wysiwyg mode.

Edge:
List is pasted as a set of paragraphs for new and old PFW.


To sum up - the test case is about IE11 and touches both filters new and old one. Additionally Edge no longer returns list like IE11 but standard set of paragraphs like other modern browsers.

Last edited 3 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 3 years ago by Sibasish palo

hi j.swiderski, Thank you for the response.

when you say "In the old PFW I only got clean list without any extra styles".does it retain the style for first element, if it is retaining the style/fontsize for the first element please provide the PFW version on which its retaining font size

Changed 3 years ago by Jakub Ś

Attachment: test list.docx added

comment:3 Changed 3 years ago by Jakub Ś

@sibasish.palo my latest comment wasn't very accurate. I needed to update it.

The problem you are describing is happening in IE and unfortunately it touches both new and old Paste From Word Filters. The new Filter hasn't been released yet - it is still being developed and tested.

comment:4 Changed 3 years ago by Tade0

Milestone: CKEditor 4.6.0

comment:5 Changed 3 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.0

We're unable to put any more PFW related tickets in 4.6.0. We'll revisit it later.

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