Rich text / foldkit-richtext-dom

EditorDom

interface · packages/richtext-dom/src/index.ts:12

interface EditorDom {
  readonly root: HTMLElement
  readonly elements: ReadonlyMap<RichText.NodeId, HTMLElement>
  readonly content: RichText.Document
  readonly rendering: RichText.Rendering
  readonly decorations: RichText.DecorationSet
}

In the guides

Members

EditorDom.root

property · packages/richtext-dom/src/index.ts:14

readonly root: HTMLElement

The owned subtree root. Everything inside belongs to this interpreter.

EditorDom.elements

property · packages/richtext-dom/src/index.ts:16

readonly elements: ReadonlyMap<RichText.NodeId, HTMLElement>

Current element per block and run identity.

EditorDom.content

property · packages/richtext-dom/src/index.ts:18

readonly content: RichText.Document

The semantic document this subtree currently represents.

EditorDom.rendering

property · packages/richtext-dom/src/index.ts:20

readonly rendering: RichText.Rendering

The registry this subtree was rendered with, and is patched with again.

EditorDom.decorations

property · packages/richtext-dom/src/index.ts:22

readonly decorations: RichText.DecorationSet

The decorations drawn over it (§129); a patch redraws a run whose share of them changed.