#99477ckeditor5 html tag limitation on custom styles
Description
We are using custom styles for the ckeditor, usually these can be limited to certain html elements:
https://ckeditor.com/docs/ckeditor5/latest/features/style.html
So in the style selector there should be only valid styles cklickable.
I have overhouled our used ckeditor configuration like:
style:
definitions:
- { name: "Internal Link", element: "a", classes: ['internal-link'] }
- { name: "External Link", element: "a", classes: ['external-link'] }
but this doesnt work, i can use every style on every element, and this produce another Problem:
If i use a link style like “internal-link” on a non A Tag (maybe a word inside a P tag, for Example: “Link”).
- Selecting the Word: Link
- Setting the style: internal-link
This is the result:
<a class="internal-link">Link</a>
And this will break the Frontend (maybe another issue, i guess this should be fixed also if empty or broken A tags are rendered)
PHP Runtime Deprecation Notice: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/typo3/cms-core/Classes/LinkHandling/TypoLinkCodecService.php line 80
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.