Skip to main content

CommonAncestorResultBranch

interface

Node a and node b have a common ancestor but are on different branches, the `a` and `b` properties of this result are the ancestors of a and b that are children of the commonAncestor. Since they are siblings, their positions are comparable to determine order in the document.

interface CommonAncestorResultBranch<A extends LexicalNode, B extends LexicalNode>

Import

import { CommonAncestorResultBranch } from '@modular/sdk/editor';

Members4

a
A | ElementNode

The ancestor of `a` that is a child of `commonAncestor`

b
B | ElementNode

The ancestor of `b` that is a child of `commonAncestor`

commonAncestor
ElementNode
type
'branch'