Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#6658 closed Bug (fixed)

Paste from Word in IE - Internal error of html formatter - Tabs in empty in lists

Reported by: Alex Owned by: Wiktor Walc
Priority: Normal Milestone: CKEditor 3.5.3
Component: Plugin : Paste from Word Version: 3.1
Keywords: Cc:

Description

When pasting from MS Word the text with one or more tab in between list items brings up an error "It was not possible to clean up the pasted data due to an internal error".

The format is like that: 1 .First list item

[tab]

2 . Second list item

This kind of format produced by Word with following steps:

  1. Create first item and mark as list
  1. Create second item (number will auto-increment)
  1. Insert a line after the first item by placing the cursor at the end of line and pressing the Enter key. New item with number "2" will appear. There will be a tab character inserted after the list number (enable "Show hidden format characters" button).
  1. Instead of using "Backspace" key to delete the item number (we want to have empty line between list items), click on the item number ("2") and hit "Delete" key. The item number will be gone, but tab will still be there.

The issue appears in IE (tested in 8 only).

Firefox 3.6 does not have this issue.

Attached is MS Word file with a sample.

Below is the code produced by MS Word (taken from sample file attached):

<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; tab-stops: list 36.0pt; mso-list: l1 level1 lfo2" class=Default><SPAN style="FONT-FAMILY: 'garamond', 'serif'; COLOR: windowtext; FONT-SIZE: 11pt; mso-fareast-font-family: garamond; mso-bidi-font-family: garamond"><SPAN style="mso-list: ignore">1.<SPAN style="FONT: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 'garamond', 'serif'; COLOR: windowtext; FONT-SIZE: 11pt; mso-bidi-font-family: garamond">First <?xml:namespace prefix = o /><o:p></o:p></SPAN></P>

<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1" class=Default><SPAN style="FONT-FAMILY: 'garamond', 'serif'; COLOR: windowtext; FONT-SIZE: 11pt; mso-fareast-font-family: garamond; mso-bidi-font-family: garamond"> <SPAN style="mso-list: ignore"> <SPAN style="FONT: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN> </SPAN></SPAN>

<SPAN style="FONT-FAMILY: 'garamond', 'serif'; COLOR: windowtext; FONT-SIZE: 11pt; mso-bidi-font-family: garamond">

<o:p>&nbsp;</o:p>

</SPAN></P>

<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; tab-stops: list 36.0pt; mso-list: l1 level1 lfo2" class=Default><SPAN style="FONT-FAMILY: 'garamond', 'serif'; COLOR: windowtext; FONT-SIZE: 11pt; mso-fareast-font-family: garamond; mso-bidi-font-family: garamond"><SPAN style="mso-list: ignore">2.<SPAN style="FONT: 7pt 'times new roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 'garamond', 'serif'; COLOR: windowtext; FONT-SIZE: 11pt; mso-bidi-font-family: garamond">Second<o:p></o:p></SPAN></P>

As you can see, there is an extra <o:p>&nbsp;</o:p> that has to be removed.

Attachments (3)

CKEditor_Word_tabs_between_list_items_Sample.docx (11.1 KB) - added by Alex 7 years ago.
Paste from word in IE - Tabs in list items
6658.patch (595 bytes) - added by Wiktor Walc 7 years ago.
6658_2.patch (575 bytes) - added by Wiktor Walc 7 years ago.
Updated patch against current trunk

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by Alex

Paste from word in IE - Tabs in list items

comment:1 Changed 7 years ago by Sa'ar Zac Elias

Keywords: ie tabs lists removed
Status: newconfirmed
Version: 3.5 (SVN - 3.5.x)3.1

comment:2 Changed 7 years ago by Wiktor Walc

It looks like w'ere not doing in line 897 the same check for listSymbol as in line 1072

Changed 7 years ago by Wiktor Walc

Attachment: 6658.patch added

comment:3 Changed 7 years ago by Wiktor Walc

Owner: set to Wiktor Walc
Status: confirmedreview

Changed 7 years ago by Wiktor Walc

Attachment: 6658_2.patch added

Updated patch against current trunk

comment:4 Changed 7 years ago by Garry Yao

Status: reviewreview_passed

comment:5 Changed 7 years ago by Wiktor Walc

Milestone: CKEditor 3.5.3

comment:6 Changed 7 years ago by Wiktor Walc

Resolution: fixed
Status: review_passedclosed

Fixed with [6621].

comment:7 Changed 4 years ago by Frederico Caldeira Knabben

Component: Core : PastingPlugin : Paste from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy