A class responsible for building the keyboard commands for the ProseMirror editor.

Hierarchy (View Summary)

Constructors

Methods

Constructors

  • Parameters

    • schema: Schema

      The ProseMirror schema to build keymaps for.

    • Optionaloptions: { onSave?: Function } = {}

      Additional options to configure the plugin's behaviour.

      • OptionalonSave?: Function

        A function to call when Ctrl+S is pressed.

    Returns ProseMirrorKeyMaps

Methods

  • Build keyboard commands for nodes and marks present in the schema.

    Returns Record<string, ProseMirrorCommand>

    An object of keyboard shortcuts to editor functions.

  • Build the plugin.

    Parameters

    • schema: any

      The ProseMirror schema to build the plugin against.

    • options: {} = {}

      Additional options to pass to the plugin.

    Returns Plugin<any>