fn

deleteSelectionInto

tested

Remove whatever the selection covers, recording the steps on tr, and say where an insertion should now go. A collapsed caret removes nothing and anchors at itself. Returns null when the selection cannot be removed (a range whose end blocks are not text).

Signature

ts
export function deleteSelectionInto(tr: Transaction, state: WritekitState): InsertAnchor | null{ ... }

Parameters

ParameterTypeDescription
trTransaction—
stateWritekitState—

Returns

InsertAnchor | null