- Issue created by @Augusto182
- 🇦🇺Australia mingsong 🇦🇺
I can't reproduce this issue with a brand new installation of Drupal 10.1.2.
Is there any contribute module involved in this issue?
- Status changed to Postponed
about 1 year ago 11:25am 30 August 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Thanks, @Mingsong!
That'd be my hunch too, because the existing test coverage proves it works fine. Plus, if this were a widely occurring problem, we'd have heard about it a lot 😇
- 🇺🇸United States sea2709 Texas
I set up the styles as ".tw-heading-1|Heading 1" and the error shows up "Enable at least one style, otherwise disable the Style plugin.". Then I realized that I need to input the element tag, so I fixed it like "p.tw-heading-1|Heading 1" and it worked. Not sure if it's the case that @Augusto182 ran into!
- Status changed to Closed: cannot reproduce
about 1 year ago 9:25am 3 October 2023 - 🇺🇸United States maruthi9999
Hi! This issue is still happening.
When I tried to add a new style (exactly how its mentioned), I am getting the same error when I save I tried to save.
Error message -
"Enable at least one style, otherwise disable the Style plugin." - 🇨🇦Canada namscott
I see this was closed quite a while ago but I've recently run into this problem as well and was able to work through it.
- Add the Styles option to the CKEditor 5 toolbar
- An error is presented as follows:
"Enable at least one style, otherwise disable the Style plugin.
The following attribute(s) can optionally be supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: Style ()."
In my case I had a number of elements that allows 'class' attributes through Source editing (for instance lists, links etc). By systematically removing each class reference from the Manually editable HTML tags, I arrived at a point where the Styles option appeared and I could start to create styles.
I found that for any plugin in the toolbar that could support a class, the manually editable class on that element must be removed in order to use the styles dropdown option.
I have another system where the styles were enabled prior to moving to CKEditor 4 and therefore the option to add configurable styles was already present although error message were displayed until I cleaned up the manually editable tags.
In retrospect the error message is correct, however suggesting as the first step to enable a style to correct the problem is confusing since there is no place to do that until you fix the second step. Perhaps suggesting removing class attributes from manually editable tags for all enabled plugins in the toolbar before you can use the styles plugin would be helpful.