Toolbar creator should support item priorities #5311
Labels
package:ui
resolution:invalid
This issue is invalid (e.g. reports a non-existent bug or a by-design behavior).
type:feature
This issue reports a feature request (an idea for a new functionality or a missing option).
Explained in https://github.com/ckeditor/ckeditor5-ui/issues/154#issuecomment-276922081.
Currently, the image plugins (
ImageStyle
andImageAlternativeText
) add their buttons to theconfig.image.defaultToolbar
array. So ifImageStyle
is loaded first, its buttons will be before theImageAlternativeText
button.It'd be good to decouple this – the order in which plugins are loaded should have no effect on the order of buttons in the toolbar. Hence, we need to prioritise them. After all plugins are loaded, the configuration should look like this:
This should render the image alt text button after image style buttons.
Note: I proposed
order
instead ofpriority
to avoid all those unclarities whether higher priority number means displaying earlier or later.The text was updated successfully, but these errors were encountered: