Bug #98202
openRTE removes class from hr due to processing.yaml definition
0%
Description
A customer wanted to set a color to the horizontal line to change the color.
While developing i encountered the problem that the class was always removed. Debugging shows a different array for the hr-tag than for example the span, which allows at least the class.
In the typo3/sysext/rte_ckeditor/Configuration/RTE/Processing.yaml i found this special lines of code:
hr:
allowedAttribs:
- class
This breaks the logic for hr-tags in typo3/sysext/core/Classes/Html/HtmlParser.php (Line 480 and following)
(btw: i'm kind of confused about the "_allowedAttribs")
a fix provided in the attached patch-file looks like this in my custom rte yaml file:
hr:
allowedAttribs: class
Thanks for taking a look at my first bug report
Files
Updated by Gerrit Code Review about 2 years ago
- Status changed from New to Under Review
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74498
Updated by Oliver Hader about 2 years ago
I was working on a patch months ago. The main problem is, that the RTE fails to handle these declarations correctly. In legacy code those were just strings, since TYPO3 v8 and having CKEditor4 in place, that was extended to array items as well - however, both still need to be supported.
However, currently array item declarations are not fully supported...
see https://review.typo3.org/c/Packages/TYPO3.CMS/+/74498
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85549
Updated by Gerrit Code Review about 1 month ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85549
Updated by Garvin Hicking 30 days ago
Please note that at the time of this writing, CKEditor5 does NOT allow styling on hr
tags: https://github.com/ckeditor/ckeditor5/issues/12973