Basic Editor
ExamplesEdit headings, paragraphs, and a callout with Editor, defaultCatalog, and an in-memory document store.
Edit a document, undo and redo changes, save in-memory snapshots, preview saved content, and restore any version as one undoable change.
Change the width and theme, then interact with the components.
Matches latest saved version
bun add @reopt-ai/opt-editorimport { Editor, StaticRenderer, createEditorStore, defaultCatalog, type EditorSpec } from "@reopt-ai/opt-editor";Edit headings, paragraphs, and a callout with Editor, defaultCatalog, and an in-memory document store.
Review changes with keyboard-accessible decisions: accept updates the document, reject keeps the original, and reset starts over.
Compose a custom authoring surface with BlockTree, BlockToolbar, document versions, and working undo/redo controls.