Issue related with 3309585.
Problem/Motivation
Style tab missing in the "CKEditor5 plugin settings" widget.
Steps to reproduce
Core: 10.1.2 (also in 10.0.9 )
1. Open configuration page for some text format, i.e. Full HTML
2. Drag and drop Style button to active toolbar
Expected result:
- Show up a "Select Style tab" under CKEditor5 plugin settings, to be able to edit such styles.
Current result:
Style tab missing in the "CKEditor5 plugin settings" widget.
Also, if configuration is summited, show up this error: "Enable at least one style, otherwise disable the Style plugin. "
Comments
Comment #2
mingsongI can't reproduce this issue with a brand new installation of Drupal 10.1.2.
Is there any contribute module involved in this issue?
Comment #3
wim leersThanks, @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 😇
Comment #4
sea2709 commentedI 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!
Comment #5
wim leers👍, good theory, @sea2709!
Comment #6
wim leersComment #7
maruthi9999 commentedHi! 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."
And I also tried this module as well
https://www.drupal.org/project/ckeditor_link_styles
No luck , same issue.
Comment #8
namscott commentedI 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.
"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.
Comment #9
tripodcreative commentedI can confirm this is still occurring. Whenever you try to add a "styles" option, you're prompted to enter a list of styles. Whenever you do, and press save, the styles option disappears from entry and an error message appears at the top of the page: "Enable at least one style, otherwise disable the Style plugin."
No matter what I enter into this field, the error continues.