<i> (iconfont icon) wrapped into <em> with "Full HTML"

Created on 13 February 2023, almost 2 years ago
Updated 30 May 2023, over 1 year ago

Problem/Motivation

<i class="fa fa-drupal">Drupal</i>

Steps to reproduce

Entering

<i class="fa fa-twitter">Twitter</i> 

( as suggested here for icons โ†’ ) using the CKEditor 5 "Sourcecode" button results in

<p>
    <em><i class="fa fa-twitter">Twitter</i></em>
</p>

when leaving the source code edit area and back.

Expected result

<p>
  <i class="fa fa-twitter">Twitter</i>
</p>

without the wrapping <em>.

I have no idea why and where this is done, but I wouldn't rate this as expected?
Also, I don't think it's totally untypical that such kinds of iconfonts are used in Drupal WYSIWYG by site builders?

This can be easily reproduced in a fresh Drupal 10 installation using https://simplytest.me/ for example.

Testing the same on the CKEditor 5 Demo page leads to different (expected) results:
https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html

<p>
    <i class="fa fa-twitter">Twitter</i>
</p>

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
CKEditor 5ย  โ†’

Last updated 18 minutes ago

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

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