-
-
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
Create separators for toolbars #5309
Comments
As well an way to guarantee the order, so we have: |
This is a completely different issue. There's no custom order support right now – order of buttons is directly inherited from the order of items in the config. And the order of items in the config depends on the order in which plugins are loaded now, though, you can override it as the developer. AFAIR, CKEditor 4 supports some menu items priority setting. We'd need something similar here to decouple the order in which plugins were loaded (which is linked to the order of buttons in the configuration) from the order of items in the toolbar. |
When reporting https://github.com/ckeditor/ckeditor5-ui/issues/155 I realised that there's a problem. One plugin doesn't know about the other so neither of them can decide to put a separator between them. So the separator must be defined differently. The first idea which came to my mind is that the image style plugin could add its item as a "toolbar group", so we'd have configuration which looks like this: config.image.defaultToolbar = [
'imageAlternativeText',
[
'imageStyleFull',
'imageStyleSide'
]
]; And, with support for order: config.image.defaultToolbar = [
{ name: 'imageAlternativeText', order: 10 },
{
items: [
'imageStyleFull',
'imageStyleSide'
],
order: 0
}
]; A separator would be displayed between two groups or between a group and a simple item. PS. We used to have a ticket for toolbar configuration, but I can't find it now. This is part of that bigger issue. |
We don't want to work on toolbar groups or priorities right now as I mentioned in https://github.com/ckeditor/ckeditor5-ui/issues/155#issuecomment-282300881. So the separator will be a visual thing only and it needs to be directly specified in the configuration: toolbar: [ 'imageTextAlternative', '|', 'imageStyleFull', 'imageStyleSide' ] |
I'm sure you meant this: toolbar: [ 'imageStyleFull', 'imageStyleSide', '|' , 'imageTextAlternative' ] ;) |
Feature: Added support for toolbar item separators. Closes #154.
Cause this is really confusing now:
The text was updated successfully, but these errors were encountered: