ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.45k stars 3.7k forks source link

Line break "br" tags have class attributes stripped out #15292

Open daveferrara1 opened 11 months ago

daveferrara1 commented 11 months ago

📝 Provide detailed reproduction steps (if any)

  1. Add some text.
  2. Insert a line break (shift-enter) to create a "<br" tag.
  3. open source
  4. Add a class to the "<br class="test""
  5. Close the source
  6. Reopen the source

✔️ Expected result

The class should remain.

❌ Actual result

The class is stripped out

📃 Other details

This can be reproduced here on the current Rich Editor Demo: https://ckeditor.com/docs/ckeditor5/latest/examples/builds-custom/full-featured-editor.html

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

daveferrara1 commented 11 months ago

Here is a sister ticket in the drupal.org issue queue: https://www.drupal.org/project/drupal/issues/3398223

wimleers commented 11 months ago

drupal.org issue: https://www.drupal.org/project/drupal/issues/3398223

EDIT: Hah, cross-posted with @daveferrara1! 🤓

Witoso commented 11 months ago

Caused by: https://github.com/ckeditor/ckeditor5/blob/39ad30090ead9dd2d54c3ac53d7f446ade9fd8ce/packages/ckeditor5-html-support/src/schemadefinitions.ts#L21-L28

Related to: https://github.com/ckeditor/ckeditor5/issues/12973