Attachment.current
property · packages/richtext-dom/src/events.ts:283
readonly current: () => EditorDomThe current subtree; replaced as patches are applied.
Rich text / foldkit-richtext-dom/events
interface · packages/richtext-dom/src/events.ts:281
interface Attachment {
readonly current: () => EditorDom
readonly sync: (
state: RichText.EditorState,
changeSet: RichText.ChangeSet,
) => void
readonly redecorate: () => void
readonly focus: (selection: RichText.Selection) => void
readonly held: () => RichText.Document
readonly composing: () => boolean
readonly answered: () => void
readonly detach: () => void
}Attachment.currentproperty · packages/richtext-dom/src/events.ts:283
readonly current: () => EditorDomThe current subtree; replaced as patches are applied.
Attachment.syncproperty · packages/richtext-dom/src/events.ts:288
readonly sync: (
state: RichText.EditorState,
changeSet: RichText.ChangeSet,
) => voidApplies a committed state, patching and restoring the browser selection. While the browser is composing, the latest state waits and is drawn when composition ends.
Attachment.redecorateproperty · packages/richtext-dom/src/events.ts:294
readonly redecorate: () => voidDraws the decorations again over what is drawn, for when they changed and the document did not, and puts the browser's selection back where it was. Nothing while composing: the next state drawn brings them.
Attachment.focusproperty · packages/richtext-dom/src/events.ts:300
readonly focus: (selection: RichText.Selection) => voidTakes the focus with the caret or range at selection, scrolled into view when it is out
of it: for a control outside the editor that sends the reader into the text, such as a table
of contents or a find bar closing on its match.
Attachment.heldproperty · packages/richtext-dom/src/events.ts:305
readonly held: () => RichText.DocumentThe latest document synced: the one waiting on a composition, or else the one drawn. A patch computed from here to the next state is what brings the subtree up to it.
Attachment.composingproperty · packages/richtext-dom/src/events.ts:307
readonly composing: () => booleanTrue between compositionstart and compositionend.
Attachment.answeredproperty · packages/richtext-dom/src/events.ts:312
readonly answered: () => voidTells it an edit it asked for is drawn, or refused: input that came after the ask was held until then, and goes on when every ask is answered. The editor answers each, in order.
Attachment.detachproperty · packages/richtext-dom/src/events.ts:313
readonly detach: () => void