Bug #101726
openEpic #99669: CKEditor5 Collection
CKEditor5: Whitespace plugin does not highlight all non breaking spaces (nbsp)
0%
Description
Paste the following code into a RTE in source editing mode and switch back into WYSIWYG mode:
<h3> Visible nbsp </h3> <p> Lorem i<strong> p </strong> sum </p> <p> indentation </p> <h3> Invisible nbsp </h3> <p> </p> <p> <br> <br> Lorem impsum <br> </p> <p> indentation </p> <p> dolor sit amet </p>
- nbsp after a whitespace are not marked
- nbsp before line ending are not marked
- multiple nbsp after line breaks are not marked
As an editor, I would expect the RTE to mark all entities.
The HTML code above was copied from a RTE in source editing mode from https://demo.typo3.org/ (TYPO3 12.4.5) from an "Text & Media" element.
Updated by Georg Tiefenbrunn over 1 year ago
Some strange behavior in Chrome on macOS:
1. Paste the code in source editing mode
2. Switch to WYSIWYG mode and back to source editing mode
<p> <br> <br> Lorem impsum <br> </p>
... is transformed to
<p> <br> <br> Lorem impsum <br> </p>
3. Switch to WYSIWYG mode and remove the two marked nbsp.
4. Switch to source editing mode
Now the two nbsp which were marked in 3. won't be marked nor multiplied anymore on editor mode switches.
<p> <br> <br> Lorem impsum <br> </p>
Updated by Georg Tiefenbrunn over 1 year ago
- Related to Epic #99669: CKEditor5 Collection added
Updated by Georg Tiefenbrunn over 1 year ago
This is caused by ckeditor5's model/view conversion.
1. Enter 1<space><space>2<space><nbsp>3
into an empty RTE.
2. Switch to source editing mode
<p> 1 2 3 </p>
As soon the content is changed (e.g. replace 3
with 4
) the model gets updated and the content is changed from 1<\u0020><\u0020>2<\u0020><\u00A0>3
to 1<\u0020><\u0020>2<\u0020><\u0020>3
.