Rich text / foldkit-richtext-dom/editor-bundle

editorView

const · packages/richtext-dom/src/editor-bundle.ts:427

const editorView: Submodel.View<{ readonly document: { readonly version: 1; readonly children: readonly ({ readonly type: "Paragraph"; readonly id: string & Brand<"foldkit-richtext/NodeId">; readonly children: readonly { readonly type: "Text"; readonly id: string & Brand<"foldkit-richtext/NodeId">; readonly text: string; readonly marks: readonly (string | { readonly name: string; readonly props?: { readonly [x: string]: Schema.Json; }; })[]; }[]; } | { readonly type: "Heading"; readonly id: string & Brand<"foldkit-richtext/NodeId">; readonly level: 1 | 2 | 3 | 4 | 6 | 5; readonly children: readonly { readonly type: "Text"; readonly id: string & Brand<"foldkit-richtext/NodeId">; readonly text: string; readonly marks: readonly (string | { readonly name: string; readonly props?: { readonly [x: string]: Schema.Json; }; })[]; }[]; } | { readonly type: "Unknown"; readonly id: string & Brand<"foldkit-richtext/NodeId">; readonly originalType: string; readonly props: { readonly [x: string]: Schema.Json; }; readonly children: readonly { readonly type: "Text"; readonly id: string & Brand<"foldkit-richtext/NodeId">; readonly text: string; readonly marks: readonly (string | { readonly name: string; readonly props?: { readonly [x: string]: Schema.Json; }; })[]; }[]; } | { readonly type: "Node"; readonly kind: string; readonly id: string & Brand<"foldkit-richtext/NodeId">; readonly props: { readonly [x: string]: Schema.Json; }; readonly children: readonly { readonly type: "Text"; readonly id: string & Brand< …;

The host element the editor mounts into, and whose id the patch Command finds (§118). It is a custom element so hydration leaves what is inside it alone (§145): on the server it holds the document's markup, which the editor adopts; in the browser the view declares it empty, and the editor owns everything below.