@add-on-hlapi-sdk / Context
Class: Context
Contains the user's current selection state, indicating the content they are focused on.
Hierarchy
ProxyLiveObject
↳
Context
Table of contents
Accessors
Accessors
hasSelection
• get
hasSelection(): boolean
Returns
boolean
false if the current editable selection does not contain any nodes, otherwise true.
insertionParent
• get
insertionParent(): ContainerNode
Returns
the preferred parent to insert newly added content into.
selection
• get
selection(): readonly Node
[]
Returns
readonly Node
[]
the current selection. Nodes that are locked or otherwise non-editable are never included in the selection.
selectionIncludingNonEditable
• get
selectionIncludingNonEditable(): readonly Node
[]
Returns
readonly Node
[]
the current selection and any locked nodes the user has attempted to select at the same time. This can happen for example if the user clicks on a locked node or if the user drags a selection marquee that overlaps locked nodes in addition to regular unlocked nodes.