[upstream] [GHS] CKEditor 5 removes empty inline elements

Created on 28 January 2023, over 1 year ago
Updated 20 December 2023, 6 months ago

Problem/Motivation

Font Awesome ( https://www.drupal.org/project/fontawesome ) requires markup like <i class="fa-brands fa-drupal"></i> to print a Drupal logo or <i class="fab fa-drupal"></i> to print a Druplicon. Similar tactic is often used for custom inline icons, for example <span class="icon my-icon"></span> My text.

CKEditor 5 strips empty inline elements, although you've listed them as "Manually editable HTML tags" under "Source editing".

Steps to reproduce

  1. Add <i class> or <span class> to "Manually editable HTML tags" under "Source editing"
  2. Create an article, select CKEditor "Source" button, type <i class="fa-brands fa-drupal"></i> Drupal or <span class="my-icon"></span> My point, save
  3. Inspect article source, see <i> and <span> tags removed

Proposed resolution

Wait for https://github.com/ckeditor/ckeditor5/issues/9888 to be fixed and shipped in a release

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.1

Component
CKEditor 5 

Last updated about 2 hours ago

Created by

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024