Typedef

DropdownMenuDefinition (ui/dropdown/menu)

@ckeditor/ckeditor5-ui/src/dropdown/menu/utils

A definition for a nestable menu component.

The menu can be flat and include only top-level items, or it can include multiple levels of nested sub-menus.

Example:

[
	{
		id: 'menu_1',
		menu: 'Menu 1',
		children: [
			{
				id: 'menu_1_1',
				menu: 'Nested menu 1',
				children: [
					{
						id: 'item_x',
						label: 'Item X'
					}
				]
			},
			{
				id: 'menu_1_2',
				menu: 'Nested menu 2',
				children: [
					{
						id: 'item_y',
						label: 'Item Y'
					},
					{
						id: 'item_z',
						label: 'Item Z'
					}
				]
			}
		]
	},
	{
		id: 'top_a',
		label: 'Top Item A'
	},
	{
		id: 'top_b',
		label: 'Top Item B'
	}
];

Filtering