@umbraco-cms/backoffice
    Preparing search index...

    Class NodeView<Component, NodeEditor, Options>

    Node views are used to customize the rendered DOM structure of a node.

    Type Parameters

    Implements

    • NodeView
    Index
    component: Component
    decorations: readonly Decoration[]
    editor: NodeEditor
    extension: Node<any, any>
    getPos: () => number | undefined
    HTMLAttributes: Record<string, any>
    innerDecorations: DecorationSource
    isDragging: boolean
    options: Options
    view: EditorView
    • get contentDOM(): HTMLElement | null

      The DOM node that should hold the node's content. Only meaningful if the node view also defines a dom property and if its node type is not a leaf node type. When this is present, ProseMirror will take care of rendering the node's children into it. When it is not present, the node view itself is responsible for rendering (or deciding not to render) its child nodes.

      Returns HTMLElement | null

    • get dom(): HTMLElement

      The outer DOM node that represents the document node.

      Returns HTMLElement

    • Delete the node.

      Returns void

    • Called when a DOM mutation or a selection change happens within the view.

      Parameters

      • mutation: ViewMutationRecord

      Returns boolean

      false if the editor should re-read the selection or re-parse the range around the mutation

    • Returns void

    • Parameters

      • event: DragEvent

      Returns void

    • Can be used to prevent the editor view from trying to handle some or all DOM events that bubble up from the node view. Events for which this returns true are not handled by the editor.

      Parameters

      • event: Event

      Returns boolean

    • Update the attributes of the prosemirror node.

      Parameters

      • attributes: Record<string, any>

      Returns void