Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

Index

Constructors

Methods

Constructors

Methods

  • _onClick(view: EditorView, pos: number, node: Node, nodePos: number, event: PointerEvent, direct: boolean): boolean | void
  • 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.

  • build(schema: any, options?: {}): Plugin<any>