Sign up (with export icon)

MediaStyleDropdownDefinition

Api-interface iconinterface

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'
		}
	]
}
Copy code

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

  • Chevron-right icon

    defaultItem : string

    The default child whose icon and label the split button mirrors when no child is active. Must be one of the items.

  • Chevron-right icon

    items : Array<string>

    Prefixed style names included in the dropdown (for example, [ 'mediaEmbed:alignBlockLeft', 'mediaEmbed:alignBlockRight' ]).

  • Chevron-right icon

    name : string

    The dropdown name. Registered as-is in the UI component factory, so it must use the mediaEmbed: prefix (for example, 'mediaEmbed:myAlignments').

  • Chevron-right icon

    title : string

    The dropdown title, used both for the split-button label and the dropdown arrow tooltip.