If the attribute is required, I wonder how one could implement an empty <code> element. Currently, always <code class=""> is emitted.
Also, when using classes: [] to indicate an empty array, the element is not choosable at all. Using classes: false|null|true only leads to having <code class="false|null|true">.
So I wonder, am I missing something here, or would it classify as a bug?
For now Style dropdown doesn't insert elements, it just adds classes to existing elements. Most likely, you would want it to insert as well, +1 the following ticket #14372.
📝 Ask a question
Having a configuration like this (asking for the context of a default TYPO3 implementation):
it seems that
classes
is a required attribute. Also https://ckeditor.com/docs/ckeditor5/latest/api/module_style_styleconfig-StyleDefinition.html does not really mention it as being optional. Leaving such an attribute out leads to the dropdown for styles not getting opened.If the attribute is required, I wonder how one could implement an empty
<code>
element. Currently, always<code class="">
is emitted.Also, when using
classes: []
to indicate an empty array, the element is not choosable at all. Usingclasses: false|null|true
only leads to having<code class="false|null|true">
.So I wonder, am I missing something here, or would it classify as a bug?