Skip to content

eo-typewriterjs


eo-typewriterjs / getSelection

Function: getSelection()

ts
function getSelection(state, cursorId): TNullable<TSelectionState>;

Defined in: core/state/helpers/typewriter-state.helper.ts:130

Parameters

ParameterTypeDescription
stateTTypewriterStateThe current typewriter state
cursorIdstringThe 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

Released under the MIT License.