- πΊπΈUnited States ericras
I don't think there is an issue with Drupal. I think this is a limitation with CKEditor5 itself.
In Drupal and on the CKEditor demo page, it works with block level elements ("Block styles") as you would expect. If you set a rule for
blockquote.my-style|My Blockquote Style
it will only be allowed on blockquote elements.However, with "Text styles" it allows them anywhere AND it creates the element where it didn't exist before. On the CKEditor demo https://ckeditor.com/docs/ckeditor5/latest/features/style.html they have a rule
span.spoiler|Spoiler
which can be added anywhere, not just to existing span elements, and it will create the span tag. It works the same way with an "a" tag rule: it can be created anywhere and the "a" tag will be added. This is unfortunate.I haven't been able to find an issue in the CKEditor project which references this behavior/limitation/bug.
- πΊπΈUnited States chrissnyder Maryland
I created ckeditor_link_styles β to overcome this limitation of CKEditor's style dropdown. It uses CKEditor 5 Link plugin's decorator config instead.
- Status changed to Closed: duplicate
over 1 year ago 12:41pm 28 March 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ