@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

    Constructors

    Properties

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

    Accessors

    • get contentDOM(): null | HTMLElement

      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 null | HTMLElement

    • get dom(): HTMLElement

      The outer DOM node that represents the document node.

      Returns HTMLElement

    Methods

    • 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