/** * @module * Editing types. DOM-dependent by definition — this module and everything * under `editor/` may reference DOM globals. Nothing in `block/`, `inline/` * or `render.ts` may import from here. */ /** * Create editing UI for a block inside `container`. * * Editors live outside `block/` so the rendering path stays DOM-free: the * `HTMLElement` in this signature is exactly what used to leak into the * published types of every pure consumer. */ export type BlockEditor = ( container: HTMLElement, raw: string, attrs: Record, onCommit: (newRaw: string, newAttrs?: Record) => void, onCancel: () => void, /** The popup toolbar element — append editor-specific controls here. */ toolbar: HTMLElement, ) => void;