Allow inline HTML comments in CKEditor 5

Created on 18 February 2023, almost 2 years ago
Updated 25 April 2024, 7 months ago

Problem/Motivation

It is common to use HTML comments in HTML content to document the contents. It is not currently possible to do this in the editor.

Steps to reproduce

In a piece of content with the ckeditor present.
In the editor, click the "Source" button to expose the HTML source.
Enter a comment, e.g. <!-- Hello world. -->
Disable the source mode.
Click the "Source" button again.
The comment will have been removed.

Proposed resolution

Provide a plugin that (optionally) allows HTML comments to be added to the content in ckeditor5.

This plugin already exists but has known issues. Specifically (but not limited to):

  1. https://github.com/ckeditor/ckeditor5/issues/10118
  2. https://github.com/ckeditor/ckeditor5/issues/10119
  3. https://github.com/ckeditor/ckeditor5/issues/10127

Remaining tasks

Work out how to do this.

User interface changes

It will be possible to add HTML comments in the ckeditor5 editor.

API changes

TBD

Data model changes

TBD

Release notes snippet

Due to a bug in Drupal, HTML comments were not preserved by CKEditor 5. Now they are.

โœจ Feature request
Status

Fixed

Version

10.2 โœจ

Component
CKEditor 5ย  โ†’

Last updated about 4 hours ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States DamienMcKenna NH, USA

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024