Skip to main content

$getAdjacentNode

function

Returns the node adjacent to the given selection point in the specified direction, or null if at a boundary.

function $getAdjacentNode(focus: PointType, isBackward: boolean): null | LexicalNode

Import

import { $getAdjacentNode } from '@modular/sdk/editor';