interface ProseMirrorMenuItem {
    action: string;
    active?: boolean;
    attrs?: object;
    class?: string;
    cmd?: ProseMirrorCommand;
    group?: number;
    icon?: string;
    mark?: MarkType;
    node?: NodeType;
    priority?: number;
    style?: string;
    title: string;
}

Properties

action: string

A string identifier for this menu item.

active?: boolean

Whether the current item is active under the given selection or cursor.

attrs?: object

An object of attributes for the node or mark.

class?: string

An optional class to apply to the menu item.

The command to run when the menu item is clicked.

group?: number

Entries with the same group number will be grouped together in the drop-down. Lower-numbered groups appear higher in the list.

icon?: string

The menu item's icon HTML.

mark?: MarkType

The mark to apply to the selected text.

node?: NodeType

The node to wrap the selected text in.

priority?: number

A numeric priority which determines whether this item is displayed as the dropdown title. Lower priority takes precedence.

style?: string

An optional style to apply to the title text.

title: string

The description of the menu item.