Skip to main content

$getSlotHost

function

Returns the host element when this node occupies one of its named slots, or null if this node is not slotted. The up-link is kept separate from LexicalNode.getParent so the slot boundary behaves like a shadow root.

function $getSlotHost(node: LexicalNode): ElementNode | DecoratorNode<unknown> | null

Import

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