Vyuh Document Docs
Vyuh Document is a document platform for Flutter and Dart: an immutable document model, an editing engine, page layout, a Flutter editor, and codecs for JSON, Markdown, HTML, DOCX and PDF. Start with a rich-text field and grow to a full paged editor on the same model.
dart
DocumentEditor(
controller: DocumentController(DocumentConfiguration.richText),
surface: const DocumentSurface.field(minLines: 3, maxLines: 8),
chrome: EditorChrome.floating,
);Start here
| Guide | What you will build or learn |
|---|---|
| Installation | Registry token, pubspec.yaml, and the imports you need. |
| Packages | Every package, its layer, and when you need it. |
| Tutorial | A rich-text field that grows, step by step, into a full document editor. |
| Typed Document API | Documents, controllers, commands and results in pure Dart. |
| Live examples | Open each surface in the playground. |
By task
| I want to | Read |
|---|---|
| Put a rich-text field in my app | Tutorial step 1, Editor widget |
| Choose which content users can add | Choose extensions, Configuration |
| Edit documents from code, a server or an agent | Commands, Addressing, Agents |
| Let people and agents edit together | Collaboration |
| Save and load documents | Loading and saving |
| Open and save Word, Markdown, HTML or PDF | Tutorial step 6, Formats |
| Show my own images and fonts | Fonts and images |
| Build a full workspace with Properties | Tutorial step 8, Components |
| Add my own element | Declare an element, Build an extension |
| Look up a type | API reference |
Two levels of API
| Typed API | Editor runtime | |
|---|---|---|
| Controller | DocumentController (vyuh_document) | DocumentEditorController (vyuh_document_editor) |
| Widget | DocumentEditor(controller:, surface:, chrome:) from document_editor.dart | DocumentEditor(controller:, configuration:) from vyuh_document_editor.dart |
| Content | DocumentConfiguration of elements | Installed DocumentExtensions and a schema policy |
| Edits | Typed commands returning Result | Flat methods (insertTable, setLink, ...) and transactions |
| Runs on | Flutter, servers, agents | Flutter |
Both share one engine and one model. Start with the typed API; reach for the runtime for host bindings such as images, fonts, links, review and export.