Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Interface ProseMirrorMenuItem

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

    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.

    menu?: string

    An associated menu item that this entry collapses under. When this entry is visible, its associated menu item is hidden.

    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.

    weight?: number

    The relative importance of an entry. Lower-weight entries are collapsed under menus before higher-weight entries when the viewport is constrained. Entries with no weight are never collapsed.