-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Style dropdown] Allow style definitions with various attributes #12494
Comments
While I like adding more flexibility, such a feature would increase the footprint of issues such as #11748, where it is about classes being (accidentally) removed, if used twice for two style configurations. Just to complete the idea of a possible issue: What about overlapping attributes when removing styles? For the Just to continue, a possible issue just with the (very simple) And: It raises clashes with existing features such as Text part language for the given example IMO, sticking to classes for this feature is perfectly fine... although the name (Style plugin) is somewhat misleading then. |
Thank you @mmichaelis. |
@semiaddict, rough guess: It would also have issues with it. Having a look at the corresponding CKEditor 4 feature, it may make sense adding the attributes section... but as recommended by me in #11748, a clear note should be added to the documentation that conflicting configurations must/should be prevented and that explicit plugins (like text part language) are favored over managing corresponding attributes via Styles feature. |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
Are there any news on this? For block-styles we found a solution using the headings-plugin, which supports ViewElementDefinition to set styles. |
📝 Provide a description of the improvement
The Style plugin currently requires each definition to have a non-empty list of classes (an empty list results in the style not being applied), and doesn't allow setting other attributes.
It would be great to be able to specify definitions for elements with other attributes than just classes, and make classes optional.
This would make it possible to implement styles that simply add inline elements (such as
<cite>
,<q>
, or<kbd>
), and allow setting attributes other than classes such as "dir".This is how it used to work in CKEditor 4, but seems to no longer be possible in CKEditor 5.
I would propose changing the style definition to something as below:
If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: