[DrupalMedia] Formatting lost when attempting to edit media within a list item in CKEditor 5

Created on 16 August 2023, over 1 year ago
Updated 25 September 2023, about 1 year ago

Problem/Motivation

Sites with Media Library and CKeditor 4 enabled that upgrade to CKeditor 5 will lose the formatting/placement of any media within an ordered or unordered list. The media becomes a block that splits the list with the media in between two lists. This exists in the Drupal 10.1.2 release.

Steps to reproduce

- Enable CKeditor (4)
- Enable Media Library
- Include the media library and list plugins in your text format
- Create content with media embedded within a list
- Update text format to CKeditor 5
- Attempt to edit the content with media within a list.

Proposed resolution

I believe the issue is that the allowed HTML for CKeditor's Document List support (https://ckeditor.com/docs/ckeditor5/latest/features/lists/document-lists...) does not allow the drupal-media element to be nested within a list. Is there anything in the CKEditor API that would allow drupal-media to be explicitly able to be nested in list item?

Remaining tasks

- TBD

User interface changes

- None

API changes

- None

Data model changes

- None

Release notes snippet

- TBD

🐛 Bug report
Status

Fixed

Version

10.1

Component
CKEditor 5 

Last updated 2 days ago

Created by

🇺🇸United States joshuami Portland, OR

Live updates comments and jobs are added and updated live.
  • JavaScript

    Affects the content, performance, or handling of Javascript.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024