The ProseMirror schema to build a menu for.
The editor view.
Optional
options: any = {}Additional options to configure the plugin's behaviour.
Additional options to configure the plugin's behaviour.
Protected
Static
_MENU_An enumeration of editor scopes in which a menu item can appear
Track whether we are currently in a state of editing the HTML source.
Attach event listeners.
The root menu element.
Called when the view is destroyed or receives a state with different plugins.
Render the menu's HTML.
Called whenever the view's state is updated.
The current editor state.
The previous editor state.
Protected
_clearProtected
Clear any marks from the current selection.
Protected
_createProtected
Instantiate the ProseMirrorDropDown instances and configure them with the defined menu items.
Protected
_getProtected
Configure dropdowns for this menu. Each entry in the top-level array corresponds to a separate drop-down.
Protected
_getProtected
_handleProtected
Handle requests to save the editor contents
Protected
_insertProtected
Display the insert image prompt.
Protected
_insertProtected
Display the insert link prompt.
Protected
_insertProtected
Display the insert table prompt.
Protected
_isProtected
Determine whether the given menu item is currently active or not.
The menu item.
Whether the cursor or selection is in a state represented by the given menu item.
Protected
_isProtected
Determine whether the given menu item representing a mark is active or not.
The menu item representing a MarkType.
Whether the cursor or selection is in a state represented by the given mark.
Protected
_isProtected
Determine whether the given menu item representing a node is active or not.
The menu item representing a NodeType.
Whether the cursor or selection is currently within a block of this menu item's node type.
Protected
_onProtected
Handle a button press.
The click event.
Protected
_showProtected
Create a dialog for a menu button.
The unique menu button action.
The dialog's template.
Optional
options: { data?: object } = {}Additional options to configure the dialog's behaviour.
Optional
data?: objectData to pass to the template.
Protected
_toggleProtected
Toggle the given selection by wrapping it in a given block or lifting it out of one.
The type of node being interacted with.
The wrap command specific to the given node.
Optional
options: { attrs?: object } = {}Additional options to configure behaviour.
Optional
attrs?: objectAttributes for the node.
Protected
_toggleProtected
Toggle link recommendations
Protected
_toggleProtected
Toggle the given selection by wrapping it in a given text block, or reverting to a paragraph block.
The type of node being interacted with.
Optional
options: { attrs?: object } = {}Additional options to configure behaviour.
Optional
attrs?: objectAttributes for the node.
Protected
_wrapProtected
Wrap the editor view element and inject our template ready to be rendered into.
Static
buildBuild the plugin.
The ProseMirror schema to build the plugin against.
Additional options to pass to the plugin.
Static
eventGlobal listeners for the drop-down menu.
A class responsible for building a menu for a ProseMirror instance.