canvist
The canvist rich-text editor engine in one crate. Add canvist and reach the document model, the editing engine, the extensions, and the headless engine through its modules; layout, collaboration, and the design canvas are a feature away.
The default features, headless and starter-kit, are what a server, a script, or a test needs: load and export ProseMirror/TipTap JSON, HTML, Markdown, and plain text, and run typed commands against explicit selections.
use Engine;
use Format;
use Position;
let engine = starter_kit;
let kit = engine.handles;
let mut doc = engine.parse?;
doc.select_range?;
doc.run?;
assert_eq!;
# Ok::
Each module is the crate it names, so canvist::headless::Engine is canvist_headless::Engine and every crate's documentation applies unchanged.
| Module | Crate | Feature |
|---|---|---|
canvist::model |
canvist_model |
always |
canvist::core |
canvist_core |
always |
canvist::extensions |
canvist_extensions |
always; starter-kit, extras, full |
canvist::headless |
canvist_headless |
headless; journal, ssr, headless-scene |
canvist::collab |
canvist_collab |
collab |
canvist::layout |
canvist_layout |
layout; parley for real font measurement |
canvist::scene |
canvist_scene |
canvas |
canvist::canvas |
canvist_canvas |
canvas |
canvist::paint |
canvist_paint |
paint; png (CPU), gpu (vello on wgpu) |
collab: Yjs collaboration. Withheadless, a document is a Yjs peer and a y-sync endpoint; withcanvas, so is a scene.ssr: server-side HTML and SVG, laid out exactly as the canvas editor paints them.headless-scene: load, edit, and export canvas scenes as SVG and PNG on a server.
The desktop editor, canvist_desktop, is a separate crate: add it next to canvist.