Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#6658 closed Bug (fixed)

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

Reported by: alex.designworks Owned by: wwalc
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.designworks 6 years ago.
Paste from word in IE - Tabs in list items
6658.patch (595 bytes) - added by wwalc 5 years ago.
6658_2.patch (575 bytes) - added by wwalc 5 years ago.
Updated patch against current trunk

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by alex.designworks

Paste from word in IE - Tabs in list items

comment:1 Changed 6 years ago by Saare

  • Keywords ie tabs lists removed
  • Status changed from new to confirmed
  • Version changed from 3.5 (SVN - 3.5.x) to 3.1

comment:2 Changed 5 years ago by wwalc

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

Changed 5 years ago by wwalc

comment:3 Changed 5 years ago by wwalc

  • Owner set to wwalc
  • Status changed from confirmed to review

Changed 5 years ago by wwalc

Updated patch against current trunk

comment:4 Changed 5 years ago by garry.yao

  • Status changed from review to review_passed

comment:5 Changed 5 years ago by wwalc

  • Milestone set to CKEditor 3.5.3

comment:6 Changed 5 years ago by wwalc

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [6621].

comment:7 Changed 3 years ago by fredck

  • Component changed from Core : Pasting to Plugin : Paste from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy