- Issue created by @Zooney
- πΊπΈUnited States smustgrave
Believe this falls under major vs critical.
Curious though can you embed a media bundle or anything else in a list and see what it does.
- πΊπΈUnited States Zooney
I've tested on drupal/core 10.1.6 and this is what happens when embedding drupal-media (using the "Insert Media" button). Note that the list isn't split into two lists. The desired behavior is to have paragraphs embedded into list item elements rather than splitting the list in two (which is how it worked in CKEdtor 4).
Before:
<ul> <li> Test1 Test2 </li> </ul>
After:
<ul> <li> <p> Test1 </p> <drupal-media data-entity-type="media" data-entity-uuid="9c10382b-8b46-4005-8aa2-9c62e2e58b3a"> </drupal-media> <p> Test2 </p> </li> </ul>
- πΊπΈUnited States chrisgross
I can confirm this issue. I think the reason it is possibly "critical" is because CKEditor 4 is out of support, and thus technically a security concern, and upgrading to 5 breaks this module's functionality. As a result, security updates are actually being held back because stakeholders won't abide by what they see as a loss of features that they previously had, and content is their primary concern. So if there is a relatively simple way to resolve this, that would be the motivation for treating this as critical.
- πΊπΈUnited States chrisgross
Here is a patch that seems to fix this issue. It uses identical code as the media patch @Zooney linked to, so thanks to them for connecting those dots. It allows these embeds to exist within lists just like media elements. It does have the odd side effect of appearing to nest the embed within an additional list element. This is only visible within the editor, not when viewing content, but this also happens with the core media fix, so that is probably just a separate core issue that needs resolved. I have just been hiding those list markers in my theme's CSS in the meantime.
- πΊπΈUnited States Zooney
I've tested the patch created by @chrisgross in #6 π Formatting lost when attempting to add/edit paragraph within a list item in CKEditor 5 Active and it fixes the issue.
- Merge request !16Issue #3405565 by chrisgross, Zooney, smustgrave: Formatting lost when... β (Merged) created by smustgrave
-
smustgrave β
committed b0dd74a8 on 3.0.x
Issue #3405565 by chrisgross, Zooney, smustgrave: Formatting lost when...
-
smustgrave β
committed b0dd74a8 on 3.0.x
- Status changed to Fixed
12 months ago 6:03pm 5 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.