Skip to main content

$getSlotNameWithinHost

function

Returns the slot name this node occupies on its host, or null when the node is not a slot value. Mirrors LexicalNode.getIndexWithinParent for slot children — answers "which named slot does this node sit in?".

function $getSlotNameWithinHost(slotChild: LexicalNode): string | null

Import

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