-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List is pasted from OneNote in a reversed order #796
Comments
@dryzhkov Thank you for creating this issue. Unfortunately, we don't support |
Thanks for the response @beatadelura. Unfortunately this is critical scenario for us and upon debugging further we observed that the reversal happens inside of https://github.com/ckeditor/ckeditor-dev/blob/master/core/htmlparser/fragment.js#L476 which is invoked from https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/pastefromword/filter/default.js#L2167. What I am unable to understand is why do we do a reversal of the list and why is it necessary? This is a scenario that's only observed when the HTML dom that's provided to CKEditor looks like follows: <ul>
<!-- Seems that CKEditor creates a fake li here when it doesn't find any children -->
<ul>
<li></li>
<li></li>
<li></li>
</ul>
</ul> |
Hello @WrathOfZombies and @dryzhkov. Thank you very much for your message. |
We don't suport OneNote but let's see how the markup is actually wrong, then based on this we can say what we want to do with it. Reopening the issue. |
Provide detailed reproduction steps (if any)
Expected resultList gets pasted as it was created in OneNote Actual resultList gets pasted with elements in reverse order Other details
I have tested this issue in OneNote 2010 and 2016. SIDE NOTE: The list pasted from OneNote looks like below:
As you can see there is double UL element what results in the editor as list inside the list element. This result can still be observed in IE11 and Edge while it has gone in Chrome in version 4.7.0 (there is no extra list any more). In Firefox till version 4.6.2, list was pasted as image inside paragraph. Starting from version 4.7.0 you get clean HTML but with reversed list items. |
Sample screen-cast |
Actually looks that it's a bug on our side @msamsel will elaborate more on that. Bug would be also relevant for Word, so it's a valid one. |
Hi, I hope I find the problem. |
Fixed by #863. |
@mlewand Thanks. Testing this out internally and I'll get back in case we have further questions. |
Are you reporting a feature request or a bug?
Bug
Check if the issue is already reported
Put all reference links here…
Provide detailed reproduction steps (if any)
Expected result
Order should be preserved (One -> Two -> Three)
Actual result
Order is reversed (Three -> Two -> One)
Other details
Note: this seems to happen only if the outer
The text was updated successfully, but these errors were encountered: