MediaStyleDropdownDefinition
The definition of a split-button dropdown that groups several media style buttons.
Integrators can declare custom dropdowns inline in config.mediaEmbed.toolbar alongside button-name strings; defaultItem is the discriminator that distinguishes a split-button media style dropdown from a generic toolbar grouping.
mediaEmbed: {
toolbar: [
'mediaEmbed:alignCenter',
{
name: 'mediaEmbed:myAlignments',
title: 'Alignment',
items: [ 'mediaEmbed:alignBlockLeft', 'mediaEmbed:alignBlockRight' ],
defaultItem: 'mediaEmbed:alignBlockLeft'
}
]
}
All names (name, items[], defaultItem) use the full prefixed component-factory form. Items referencing styles that are not in the resolved config.mediaEmbed.styles list are filtered out at registration time. A dropdown that ends up with fewer than two items is skipped. If the configured defaultItem was filtered out, the first surviving item is used.
Properties
defaultItem : stringmodule:media-embed/mediaembedconfig~MediaStyleDropdownDefinition#defaultItemThe default child whose icon and label the split button mirrors when no child is active. Must be one of the
items.items : Array<string>module:media-embed/mediaembedconfig~MediaStyleDropdownDefinition#itemsPrefixed style names included in the dropdown (for example,
[ 'mediaEmbed:alignBlockLeft', 'mediaEmbed:alignBlockRight' ]).name : stringmodule:media-embed/mediaembedconfig~MediaStyleDropdownDefinition#nameThe dropdown name. Registered as-is in the UI component factory, so it must use the
mediaEmbed:prefix (for example,'mediaEmbed:myAlignments').title : stringmodule:media-embed/mediaembedconfig~MediaStyleDropdownDefinition#titleThe dropdown title, used both for the split-button label and the dropdown arrow tooltip.