Opened 6 years ago

Closed 2 months ago

Last modified 2 months ago

#7262 closed Bug (fixed)

Paste from Word: Lists in preformatted body disappear

Reported by: toma25 Owned by:
Priority: Normal Milestone: CKEditor 4.6.0
Component: Plugin : Paste from Word Version: 3.4
Keywords: IBM Haspatch Cc: satya_minnekanti@…

Description

When having a list in word, which has format preformat. Pasting such a list causes the list to disappear. It seems the reason for this is that only half of the handling for changing from "word-html-list" to "ckeditor-html-list".

I did a patch for this, dont know if its the right fix though.

word document attached shows the problem.

Attachments (7)

support_for_pre_wrapped_lists_from_word.patch (660 bytes) - added by toma25 6 years ago.
patch
preformatted_list.docx (11.8 KB) - added by toma25 6 years ago.
word doc showing the error
7262_firefox_rawdata_office2010std.txt​ (19.9 KB) - added by wwalc 2 years ago.
7262_chrome_rawdata_office2010std.txt (2.4 KB) - added by wwalc 2 years ago.
7262_ie8_rawdata_office2010std.txt (2.2 KB) - added by wwalc 2 years ago.
7262_ie11_rawdata_office2010std.txt (1.5 KB) - added by wwalc 2 years ago.
7262_firefox_rawdata_office2010std_2.txt​​ (19.9 KB) - added by wwalc 2 years ago.

Download all attachments as: .zip

Change History (19)

Changed 6 years ago by toma25

patch

Changed 6 years ago by toma25

word doc showing the error

comment:1 Changed 6 years ago by toma25

This error appears in IE8 Chrome9. In FF3, the text appears as normal text, not as a list. Again, I don't know what behavior that is considered right in CK editor. In my app, I prefer treating it as a HTML list, which the patch does. the behavior in FF is not changed by the patch.

comment:2 Changed 6 years ago by satya

  • Cc satya_minnekanti@… added
  • Keywords IBM added

comment:3 follow-up: Changed 6 years ago by toma25

Forgot to mention that the patch is for \_source\plugins\pastefromword\filter\default.js

comment:4 in reply to: ↑ 3 Changed 6 years ago by toma25

Replying to toma25:

Forgot to mention that the patch is for \_source\plugins\pastefromword\filter\default.js

in version 3.5.2

comment:5 Changed 6 years ago by krst

  • Keywords Haspatch? added; list pre word removed
  • Status changed from new to confirmed
  • Version changed from 3.5 to 3.4

Confirmed for PasteFromWord (word 2010)

comment:6 Changed 5 years ago by j.swiderski

  • Keywords Haspatch added; Haspatch? removed

comment:7 Changed 3 years ago by fredck

  • Component changed from Core : Pasting to Plugin : Paste from Word

comment:8 Changed 2 years ago by wwalc

Result of pasting in IE8 (using Office 2010):

<pre>
&lt;&gt;&middot;&lt;/&gt;&middot;&lt;/&gt;&middot;Text3</pre>

Result of pasting in Firefox 34 (using Office 2010):

<pre>
&lt;&gt;&middot;&middot;&middot;Text3</pre>

Result of pasting in Chrome 39 (using Office 2010):

<pre>
&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Text1</pre>

<pre>
&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Text2</pre>

<pre>
&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Text3</pre>

Result of pasting in IE11 (using Office 2010):

<ul>
	<li>
	<pre>
Text1</pre>
	</li>
	<li>
	<pre>
Text2</pre>
	</li>
	<li>
	<pre>
Text3</pre>
	</li>
</ul>

Changed 2 years ago by wwalc

Changed 2 years ago by wwalc

Changed 2 years ago by wwalc

Changed 2 years ago by wwalc

comment:9 Changed 2 years ago by wwalc

The results are actually even more interesting.

Firefox 34

allowedContent : true,
pasteFromWordRemoveStyles : false,
pasteFromWordRemoveFontStyles : false

results in:

<pre style="margin-left:.5in;text-align:justify;text-indent:-.25in;">
<span style="font-family:symbol;"><span style="font-size:12.0pt;">&lt;&gt;&middot;<span style="font-size:12.0pt;">Text1</span></span></span></pre>

<pre style="margin-left:.5in;text-align:justify;text-indent:-.25in;">
<span style="font-family:symbol;"><span style="font-size:12.0pt;">&lt;&gt;&middot;<span style="font-size:12.0pt;">Text2</span></span></span></pre>

<pre style="margin-left:.5in;text-align:justify;text-indent:-.25in;">
<span style="font-family:symbol;"><span style="font-size:12.0pt;">&lt;&gt;&middot;<span style="font-size:12.0pt;">Text3</span></span></span></pre>

Firefox 34

allowedContent : true
pasteFromWordRemoveStyles : true,
pasteFromWordRemoveFontStyles : true

results in Text1 & Text2 being lost:

<pre>
&lt;&gt;&middot;&middot;&middot;Text3</pre>

comment:10 Changed 14 months ago by Anna

  • Summary changed from Paste from word - lists in pre formatted body disappear. to Paste from Word: Lists in preformatted body disappear

comment:11 Changed 2 months ago by Tade0

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

Fixed with new Paste From Word plugin in 4.6.0.

comment:12 Changed 2 months ago by Anna

  • Milestone set to CKEditor 4.6.0
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy