-
-
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
An error thrown when setting a data containing a list element with an inline font-weight (regression) #1399
Comments
Could be related to changes done by @f1ames, related with lists pasting? |
Yes, it seems the issue was introduced together with ckeditor/ckeditor5-list#113 PR. However, the cause is more general as @scofalik pointed out. What happens is:
Now, there are few things to consider:
|
When
So in line 07, the When
and the same happens when Another thing I have noticed is that autoparagraphing converter has the |
Isn't it because li converter explicitly converts it's children first and then it creates an element for itself? I am not looking into the code so this may be totally wrong :P. |
I was thinking about it, but from what I see I think there are at least two issues here:
☝️ I was wondering if the order is not caused by the fact that priority is respected only for the same type of converters. So when |
@scofalik Do you think we should treat it as two separate issues and go with the 1 point here (which restores the previous behaviour of setting such data). And then in another issue try to improve converters (investigate the execution order) so setting content as above will result in correct list? |
In upcast the situation is a little stinky cause we have the same event for elements upcasting and attributes upcasting. For this reason, we need to manage it using priorities. Attributes upcasting should happen always after elements upcasting. AFAICS the default priority for |
Other: Upcast element to attribute defaults to `low` priority instead of `normal`. Closes ckeditor/ckeditor5#1399.
Is this a bug report or feature request? (choose one)
🐞 Bug report
💻 Version of CKEditor
11.2.0
📋 Steps to reproduce
editor.setData( '<ol><li style="font-weight: bold">foo</li></ol>' )
✅ Expected result
Data is set. In 11.1.1 it wasn't quite valid but at least there was no error:
❎ Actual result
An error is thrown
📃 Other details that might be useful
It's a regression of 11.2.0.
The text was updated successfully, but these errors were encountered: