Rich text / foldkit-richtext-dom/view

renderDocument

function · packages/richtext-dom/src/view.ts:157

function renderDocument(
  document: RichText.Document,
  renderer?: RichText.Rendering,
  decorations?: RichText.DecorationSet,
): Html

The whole document as a div of block elements. A decoration set is projected over the document and overlaid on the runs it covers (§64): the document itself is never changed, and a caller that computes its decorations per render discards them with the render.