The image style custom drop-down definition descriptor
This definition can be implemented in the image toolbar configuration
to define a completely custom drop-down in the image toolbar.
ClassicEditor.create( editorElement, {
image: { toolbar: [
// One of the predefined drop-downs
'imageStyle:wrapText',
// Custom drop-down
{
name: 'imageStyle:customDropdown',
title: Custom drop-down title,
items: [ 'imageStyle:alignLeft', 'imageStyle:alignRight' ],
defaultItem: 'imageStyle:alignLeft'
}
] }
} );
Note: At the moment it is possible to populate the custom drop-down with only the buttons registered by the ImageStyle
plugin.
The defined drop-down will be registered
as the DropdownView
with the SplitButtonView
under the provided name in the
ComponentFactory