During the CKEditor 4 → 5 upgrade path, the CKEditor 5 module would enable the "Language" button (because it supports <span lang dir>) just to support <span>. Generalized: it'd enable whichever CKEditor 5 plugin supports a superset of the tag (<tag attr>) it needs to be able to support to not lose support for tags (<tag>) allowed by the text format.
Most sites' Basic HTML
text format have <span> in their list of allowed HTML tags because that is the default.
The "Language" button has very limited use in a Drupal site because content languages are organized through the Core modules, and the user experience can be really confusing if HTML markup for languages can also be added within a field. Therefore enabling the "Language" button should be a conscious choice of a site builder, not the default option. Enabling it just to support the <span> tag is not appropriate and should therefore be considered a regression.
This is why a significant API change was introduced for CKEditor 5 plugin definitions: previously
elements:
- <a href>
meant: the plugin can create
. Since this, the meaning has changed to <a> tags and set the href attribute on themthe plugin can not create
.<a> tags but only set the href attribute on them
To retain the previous behavior, you need to explicitly indicate in the plugin metadata in your *.ckeditor5.yml file that creating the <a> tag is supported. That looks like this:
elements:
- <a>
- <a href>
"Plain tags" listed in drupal.elements, i.e. with zero attributes, are interpreted to be creatable tags. See CKEditor5PluginDefinition::getCreatableElements().
Developers: Validation at development time
If your plugin implements CKEditor5PluginElementsSubsetInterface and it returns an illogical subset, you'll get a logic exception — for example:
LogicException: The "media_media" CKEditor 5 plugin implements ::getElementsSubset() and did return a subset ("<drupal-media data-entity-type data-entity-uuid alt>") but the following tags can no longer be created: "<drupal-media>".
Site Builders: Validation at configuration time
Consequently, if you now enable a plugin that is only able to set attributes and the tag cannot yet be created by CKEditor 5, that you will get a validation error in the configuration UI: 
And it disappears/never appears if <span> is supported:

Comments
Enable the tag and save before enabling plugin
Thank you this helped me today! If anyone is having trouble saving this form, just add the tag first and save, then go back in and enable the plugin.
I am trying to follow your
I am trying to follow your instructions in Drupal 10 and CKEditor 5 but the tags in Source editing are overriden when I try to save and I get a warning message.
Whatever that I write, when saving the Source editing field gets this:
<b> <i> <cite> <dl> <dt> <dd> <figure> <figcaption> <audio> <video> <source> <track> <div> <embed> <object> <iframe>And this
Error message
Since I am migrating from a D7, no to break old content, I have to uncheck "Limit allowed HTML tags and correct faulty HTML" that I used before in CKEditor to clean code from users.
I am searching, but not luck. If you can help with any tip, it will be very wellcome. Thanks
//trying to answer one question for each one that i make.
//this way, drupal will be more friendly and strong
+1
+1
Having a similar issue: as
Having a similar issue: as soon as I add "
<iframe>" (with or without attributes) to "Source editing", I get the same kind of error.Temporarily fixed by leaving "
<iframe>" out of "Source editing" and adding iframe capabilities via the CKEditor iFrame module, but this still doesn't allow me to add custom attributes like "allowfullscreen".I am facing the same issue
I am facing the same issue when adding "
<iframe>" to Source editing.Drupal 10.2
CkEditor 5
Yeah. I am trying to help
Yeah. I am trying to help contribute to the ckeditor liststyle module.
I added:
And we are getting:
LogicException: The "ckeditor_liststyle_liststyle" CKEditor 5 plugin implements ::getElementsSubset() and did return a subset ("<ul type><ol type reversed start>") but the following tags can no longer be created: "<ul><ol>". in Drupal\ckeditor5\Plugin\CKEditor5PluginManager->getProvidedElements() (line 409 of /home/ide/project/docroot/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php).And of course the eternal problem of this message on the text format.
Even adding the ul and ol manually to the config yml file won't override the Allowed HTML tags on import.
So what are we supposed to do?
It seems that the core
It seems that the core ckeditor5_language plugin should be updated thusly:
Right now if you want to enable the language plugin but do not want to enable source editing, you have no options. The following error appears:
"The Language plugin needs another plugin to create , for it to be able to create the following attributes: . Enable a plugin that supports creating this tag. If none exists, you can configure the Source Editing plugin to support it."
This is confusing. See https://www.drupal.org/project/drupal/issues/3388978
It seems natural to allow the language plugin to also create the tag it may modify.
Is there any problem with this?