Closed TheFunkyMonk closed 1 year ago
I don’t think it was intended that you could specify a class name within your heading options. The Heading dropdown is really only meant to be used to specify a heading level (or paragraph), not any additional styling. That’s why we’ve simplified the UI of customizing it, via the “Heading Levels” CKEditor config setting.
All styling of those elements is supposed to be done via the Styles dropdown.
You can request that Heading be expanded to support custom classes over at https://github.com/ckeditor/ckeditor5/issues.
Description
Using a custom config, if I set a custom heading option ("subtitle" in this example), the view class I set is being stripped on entry save. Disabling or enabling the "Purity HTML" option on the field has no effect.
https://user-images.githubusercontent.com/1728770/234957441-61147d30-a302-4448-9126-6e9e1e522b3b.mp4
Oddly, if I create a style definition and add the style selection option to the toolbar, the classes persist on save as expected (for both the heading option alone, and a paragraph set to the subtitle style.
https://user-images.githubusercontent.com/1728770/234958687-631d622f-ca03-4dea-8f7d-e28efa4f76fd.mp4
Config is as follows:
I would like Subtitle to be a heading option, not a styling option, but have its class persist on save. Am I misunderstanding how to configure CKeditor, or is this a bug?
Steps to reproduce
Additional info