-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
HTML comments: comments located between some HTML tags are repositioned or lost #10118
Comments
Similar issue is with the Example: after initializing the editor with the following content: <!-- c1 -->
<ol>
<!-- c2 -->
<li>
<!-- c3 -->
Ordered list item
<!-- c4 -->
</li>
<!-- c5 -->
</ol>
<!-- c6 -->
<ul>
<!-- c7 -->
<li>
<!-- c8 -->
Unordered list item
<!-- c9 -->
</li>
<!-- c10 -->
</ul>
<!-- c11 --> the <!-- c1 -->
<ol>
<li>
<!-- c3 -->
Ordered list item
<!-- c4 -->
</li>
</ol>
<!-- c6 -->
<ul>
<li>
<!-- c8 -->
Unordered list item
<!-- c9 -->
</li>
</ul>
<!-- c11 --> Comments |
I am currently trying to solve this issue with lists, specifically the newer So far I've only been able to figure out that these comments (like the c2, c5, c7, c10 from the previous comment) don't make it to the upcast converter in Example markup: <ul>
<li>
one
</li>
<!--
<li>
two
</li>
-->
</ul> This turns into: <ul>
<li>
one
</li>
</ul> |
@niegowski any ideas here? |
I have a potential solution for lists, I can propose a fix in a pull request. I started looking into tables to see if it could be solved in a similar way but didn't get very far yet. Update: In some cases the comments will still get repositioned (when at the start/end of the list from what I can see), but they would not be lost. I haven't looked into any solution for repositioning yet since my main concern is data loss. I will put up a basic PR later referencing this issue, and I can work on some tests next week. Update again: Actually List and DocumentList both need updates, I have been focused on DocumentList but will see if List can be updated as well. |
@star-szr Any update on comment repositioned within table? |
Hi, it's not needed for the project that I am working on so I am not planning to work on that. |
Provide a description of the task
Steps to reproduce:
HtmlComment
manual test: http://localhost:8125/ckeditor5-html-support/tests/manual/htmlcomment.html.editor.getData()
. A few comments, originally located between<figure>
and<table>
,<table>
and<tbody>
or<tbody>
and<tr>
, are moved after the closing</table>
tag.It is also easily reproducible using
SourceEditing
:comments.repositioned.mp4
The text was updated successfully, but these errors were encountered: