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

    Variable getNodeAtPositionConst

    getNodeAtPosition: (
        state: EditorState,
        typeOrName: string | NodeType$1,
        pos: number,
        maxDepth?: number,
    ) => [Node$1 | null, number]

    Finds the first node of a given type or name in the current selection.

    Type Declaration

      • (
            state: EditorState,
            typeOrName: string | NodeType$1,
            pos: number,
            maxDepth?: number,
        ): [Node$1 | null, number]
      • Parameters

        • state: EditorState

          The editor state.

        • typeOrName: string | NodeType$1

          The node type or name.

        • pos: number

          The position to start searching from.

        • OptionalmaxDepth: number

          The maximum depth to search.

        Returns [Node$1 | null, number]

        The node and the depth as an array.