Style tab missing in the "CKEditor5 plugin settings" widget

Created on 11 August 2023, over 1 year ago

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. "

🐛 Bug report
Status

Active

Version

10.1

Component
CKEditor 5 

Last updated 1 day ago

Created by

🇨🇴Colombia Augusto182

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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 over 1 year ago
  • 🇧🇪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!

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    👍, good theory, @sea2709!

  • Status changed to Closed: cannot reproduce about 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • 🇺🇸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.

Production build 0.71.5 2024