eo-typewriterjs / getSelection
Function: getSelection()
ts
function getSelection(state, cursorId): TNullable<TSelectionState>;Defined in: core/state/helpers/typewriter-state.helper.ts:130
Parameters
| Parameter | Type | Description |
|---|---|---|
state | TTypewriterState | The current typewriter state |
cursorId | string | The cursor id to look up |
Returns
TNullable<TSelectionState>
The TSelectionState for the cursor, or null if no selection exists
Description
Retrieve a nullable selection for a cursor from state