fn
applyTransaction
testedProduce the next writekit state from a transaction. Stored marks are kept when explicitly set, cleared on any content change, and otherwise preserved.
Signature
ts
export function applyTransaction(state: WritekitState, tr: Transaction): WritekitState{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
state | WritekitState | — |
tr | Transaction | — |
Returns
WritekitState| Property | Type | Description |
|---|---|---|
doc | WritekitDocument | — |
selection | Selection | — |
schema | Schema | — |
registry | Registry | — |
storedMarks | Marks | null | Marks to apply to the next typed character (toggle-before-type). |