If ckeditor5 is configured with the List plugin, it adds the <ol> and <ul> tags to its managed tags list.
If we want to allow our content editors to add classes to their lists, without predefining every possible class in the styles dropdown, I would expect that we should be able to add something like <ol class> <ul class> to the "Manually editable HTML tags" list under "Source editing". However, since the List plugin is active, it won't permit this; it alerts us that "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 (<ul class>)."
Is there a way to modify the attributes permitted on a tag in the source editing settings? The only options I can find are to either remove the List plugin entirely (not desirable for the majority of the time when users simply want to use the tags without any custom styles), or to define every possible combination of classes in the Styles list.
Comments
On Drupal 10.1.6 I can add
On Drupal 10.1.6 I can add the "class" attribute to the "Manually editable HTML tags" without problems.
1. What Drupal version, profile and theme are you using?
2. Do you need that a user be able to add classes in the "Source code" mode or in the normal mode by using menu buttons (like "Start at" properties)?
What @wrd-oaitsd is saying is
What @wrd-oaitsd is saying is that you cannot add class attribute like so:
<ol class> <ul class> <a class>
under Source editing when you have Ckeditor Style button placed active.
I confirm this is a problem in Drupal 10. Currently digging for a solution.
https://www.drupal.org/project/drupal/issues/3410364
I am a Drupal developer and astrophotographer.
https://www.astrobin.com/users/pawel.traczynski/
@pawel.traczynski, the
@pawel.traczynski, the colleagues, like me, also can't reproduce the issue on Drupal 10.1.6 (see the comments #34 and #36 of the the #3410100 issue).
But the patch, proposed in #38, can be started point for a solution.
Thanks. I have uploaded
Thanks. I have uploaded screenshot there.
I am a Drupal developer and astrophotographer.
https://www.astrobin.com/users/pawel.traczynski/