[upstream] CKEditor 5 removes empty inline elements

Created on 28 January 2023, about 2 years ago

Problem/Motivation

Font Awesome 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

Postponed

Version

9.5

Component
CKEditor 5 

Last updated 2 days ago

Created by

leymannx Berlin

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

Comments & Activities

Production build 0.71.5 2024