eo-typewriterjs / withSelectionCleared
Function: withSelectionCleared()
ts
function withSelectionCleared(state, cursorId): TTypewriterState;Defined in: core/state/helpers/typewriter-state.helper.ts:80
Parameters
| Parameter | Type | Description |
|---|---|---|
state | TTypewriterState | The current typewriter state |
cursorId | string | The cursor id whose selection should be cleared |
Returns
A new TTypewriterState with the selection removed
Description
Return a new state with the selection for the given cursor cleared. If the cursor had no selection the same state is returned.