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

    Class ProseMirrorKeyMaps

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

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Parameters

      • schema: Schema

        The ProseMirror schema to build keymaps for.

      • Optionaloptions: { joinDoubleBreak?: boolean; onSave?: Function } = {}

        Additional options to configure the plugin's behavior.

        • OptionaljoinDoubleBreak?: boolean

          If a double line-break is detected, join it into a paragraph instead.

        • OptionalonSave?: Function

          A function to call when Ctrl+S is pressed.

      Returns ProseMirrorKeyMaps

    Accessors

    • get key(): PluginKey<any>

      A unique key for this plugin that can be used to identify a plugin instance in any given editor.

      Returns PluginKey<any>

    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>