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

Hierarchy (view full)

Constructors

Methods

Constructors

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>