ContextMenuItem
23 Sep 20251 minute to read
Represents a context menu item model in the block editor component.
Properties
iconCss string
Specifies the CSS class for the menu item icon.
This allows for styling customization.
Defaults to ’’
id string
Specifies the unique identifier of the context menu item.
Defaults to ’’
items ContextMenuItemModel[]
Specifies sub-items within the context menu item.
This enables hierarchical menu structures.
Defaults to null
separator boolean
Specifies whether this item is a separator.
If set to true, this item is displayed as a separator between menu items.
Defaults to false
shortcut string
Specifies the keyboard shortcut for the menu item.
This allows users to trigger the menu item using a specific key combination.
Defaults to ’’
text string
Specifies the display text of the context menu item.
Defaults to ’’