Tutorial
Start with the smallest editor, a rich-text field, and grow it into a full document editor. Each step adds one capability and names the packages it needs.
| Step | You add |
|---|---|
| 1. A rich-text field | A typed controller and a field that grows with its text |
| 2. Toolbar and structure | Headings, lists, tasks, tables, a toolbar row, commands from code |
| 3. A document editor | The editor runtime, chosen extensions, images, the action toolbar |
| 4. Pages, headers and footers | Pages, header and footer stories, page numbers, footnotes |
| 5. Review and comments | Suggesting mode, comments, accept and reject |
| 6. Import and export | Markdown, HTML, DOCX and PDF |
| 7. Diagrams and math | Mermaid, KaTeX equations and Vyuh diagrams |
| 8. Workspace and inspector | Workspace scaffold, Properties inspector, rulers |
Two levels of API
Steps 1 and 2 use the typed API: DocumentController and DocumentEditor(controller:, surface:, chrome:). It is pure Dart, so the same controller also runs headless for servers and agents. From step 3 you use the editor runtime, DocumentEditorController, for host bindings: images, fonts, links, review, export and Properties. Both share one engine and one document model.
Prefer to see it first? Open the field, notes and pages surfaces in the playground.
Before you start
Follow Installation to add a registry token. Every step assumes a Flutter app with MaterialApp at the root.
Next
Start with step 1: a rich-text field.