HTML Comments not working for list items

Created on 8 August 2024, 5 months ago

Problem/Motivation

CKEditor 5 HTML Comments plugin supports commenting out individual list items, whereas the Drupal implementation strips out the commented-out item. This is with HTML correction plugins disabled on the text format.

Steps to reproduce

Create text format
Assign CKEditor 5
Configure to use the source plugin
Configure to not use faulty HTML correction plugins
Create a list in the text field using CKEditor 5 text format
Source edit
Comment out a list item
Turn off source editing
Source edit
Note list item is removed

Proposed resolution

Leave the commented out list items in the HTML source.

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
CKEditor 5 

Last updated 2 days ago

Created by

🇨🇦Canada cchiste

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cchiste
  • With this markup, list item "beta" is removed when switching out of source mode.

    <ul>
        <li>
            alpha
        </li>
        <!--<li>
            beta
        </li>-->
        <li>
            gamma
        </li>
    </ul>
    

    I see this happening entirely in CKEditor without posting the form. I don't think Drupal's filters are involved.

Production build 0.71.5 2024