Opened 12 years ago

Closed 7 years ago

Last modified 7 years ago

#8754 closed Bug (fixed)

Multiple nested lists and PasteFromWord

Reported by: Jonathan Owned by:
Priority: Normal Milestone: CKEditor 4.6.0
Component: Plugin : Paste from Word Version: 3.6.1
Keywords: Firefox Cc:

Description (last modified by Jakub Ś)

When you use the PasteFromWord Command on multiple nested lists, only the first nested list is really nested after pasting.

Try with

<ol id="d65e23">
	<li>
		toto
		<ol>
			<li>
				bibop</li>
			<li>
				tutut</li>
		</ol>
	</li>
	<li>
		tata
		<ol>
			<li>
				lolilop</li>
			<li>
				reir</li>
		</ol>
	</li>
	<li>
		tutu</li>
	<li>
		lolo</li>
</ol>

on the ckeditor demo

Put the code and then copy and pastefromWord, you'll lose the second ol

I tried to fix it for my webapp and found a way. I hope i didn't break anything by doing that.

In the flattenList filter in default.js line 418 (in ckeditor 3.6.1) i just did the following code : children = element.children so that the global loop takes in acount the flattened ol/ul. Otherwise the increase of level is lost.

Change History (5)

comment:1 Changed 12 years ago by Jakub Ś

Description: modified (diff)
Keywords: Firefox added; PasteFromWord removed
Status: newconfirmed

Ticket described here is reproducible only in Firefox and only when using pasteFromWord.

Revisions when is got broken are the same as described in #8103 so this may be a DUPLICATE.

Pasting such lists worked till version 3.6.
From revision [6911] it got broken. All elements were pasted as first level list-items.
In rev [6977] there was a slight improvement. Items after first sub-list weren't pasted.
From rev [7008] it works as described above.

comment:2 Changed 12 years ago by Jakub Ś

The same TC causes different problems in other browsers: #8781

comment:3 Changed 10 years ago by Frederico Caldeira Knabben

Component: Core : PastingPlugin : Paste from Word

comment:4 Changed 7 years ago by Tade0

Resolution: fixed
Status: confirmedclosed

Fixed with new Paste From Word plugin in 4.6.0.

comment:5 Changed 7 years ago by Anna Tomanek

Milestone: CKEditor 4.6.0
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