The MarkupEditor logo

Class: DropdownSubmenu

DropdownSubmenu(content, options)

Represents a submenu wrapping a group of elements that start hidden and expand to the right when hovered over or tapped.

Modified from: prosemirror-menu

Constructor

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

DropdownSubmenu

Methods

render()

Renders the submenu.

Table of contents