Rich text / foldkit-richtext-dom/editor
attachEditor
function · packages/richtext-dom/src/editor.ts:362
function attachEditor(
host: Element,
content: RichText.Document,
emit: (message: EditorEvent) => void,
drawing?: EditorDrawing,
): AttachmentAttaches the translation to a host element and reports each Message through
emit. Separate from the mount so a test can drive the DOM without pulling a
stream, and so a caller embedding the editor directly can say how it draws.