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

    Class ProseMirrorClickHandler

    A class responsible for managing click events inside a ProseMirror editor.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    Methods

    Constructors

    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

    • Protected

      Handle a click on the editor.

      Parameters

      • view: EditorView

        The ProseMirror editor view.

      • pos: number

        The position in the ProseMirror document that the click occurred at.

      • node: Node

        The current ProseMirror Node that the click has bubbled to.

      • nodePos: number

        The position of the click within this Node.

      • event: PointerEvent

        The click event.

      • direct: boolean

        Whether this Node is the one that was directly clicked on.

      Returns boolean | void

      A return value of true indicates the event has been handled, it will not propagate to other plugins, and ProseMirror will call preventDefault on it.

    • Parameters

      • schema: any
      • options: {} = {}

      Returns Plugin<any>