Constructor
new DropdownSubmenu(content, options)
Creates a submenu for the given group of menu elements. The following options are available:
| Type | Property | Description |
|---|---|---|
Function(): boolean |
enable |
Function to return true if MenuItem is enabled, else false. |
string |
label |
The string to show in the MenuItem |
KeymapConfig |
keymap |
The KeymapConfig to use for the MenuItem |
Command |
run |
The Command to run when the item is pressed |
Function(): boolean |
active |
Function to return true if MenuItem is active, else false. |
object |
attrs |
Node attrs that can be used within the enable or active functions. |
Parameters:
| Name | Type | Description |
|---|---|---|
content |
Array.<(MenuItem|Array.<MenuItem>)> | The submenu's contents in the form of MenuItems. |
options |
object | See list above. |
Classes
Methods
render()
Renders the submenu.