Native Rust WYSIWYG editor framework for Leptos (and, post-v0.1, Dioxus). See DESIGN_NOTES.md for architecture, scope rationale, and resolved design decisions.
This document is the single source of truth for what has been done, what is in progress, and what is planned. It is updated as work lands.
| Current release | v0.5.3 — selection-mirror race fix (multi-word drag-select clipping) + basic-dioxus full toolbar parity |
| Last updated | 2026-06-12 |
| First milestone | v0.1.0 — publishable MVP (done) |
| Second milestone | v0.2.0 — closing v0.1 gaps + platform broadening (done) |
| Third milestone | v0.3.0 — full tables + pointer-interaction platform (done) |
| Effort estimate to v0.1 | 2–4 months full-time solo (~11–15k LOC, excluding tests) |
| First framework adapter | Leptos |
| License | MIT OR Apache-2.0 |
| MSRV | 1.80 |
- ✅ Done
- 🚧 In progress
- ⏳ Planned for v0.1
- 💤 Deferred to v0.2+
- ❄️ Out of scope for v0.1 — community contribution surface
- ✅ Market research — confirmed gap in pure-Rust WYSIWYG for Leptos and Dioxus (see DESIGN_NOTES §1)
- ✅ Layered architecture —
core/dom/ framework adapter / extensions - ✅ LOC and time budget — v0.1 ~10–14k LOC, v1.0 ~20–26k LOC
- ✅ Crate naming —
taino-editfamily of 6 crates - ✅ All design decisions in DESIGN_NOTES §6 resolved
- ✅ Locked technical choices: MSRV, Leptos pinning strategy, CI matrix, license
- ✅ Phase 0 — Workspace scaffold and CI baseline (2026-05-15): six crates build/
fmt/clippy/test/docgreen;cargo package --workspaceverifies all six; Leptos pinned at0.8,web-sys/js-sys0.3,wasm-bindgen0.2 - ✅ Phase 1 — Core: document model (2026-05-19): typed tree (Node/Mark/Fragment/Slice), schema + content automaton,
ResolvedPos, schema-checked JSON round-trip, and a dependency-free escaped HTML serializer + strict depth-bounded HTML parser; 14 acceptance tests intaino-edit-core - ✅ Phase 2 — Core: transforms, state, history (2026-05-19): ProseMirror-ported
replace, all five steps (Replace/ReplaceAround/AddMark/RemoveMark/Attr) with invert+map+JSON, StepMap/Mapping with mirror-recover,Transform,Selection,EditorState/Transaction, bounded undo/redoHistory; 29 step/transform/state tests (generic plugin registry deferred to v0.2) - ✅ Phase 3 — Core: commands, keymap, input rules (2026-05-19):
Command/chain, selection/mark/block/join commands,Transform::split, cross-platformKeymap+base_keymap, regexInputRules(text_replace/textblock_type/wrapping); 27 command/keymap/inputrule tests.taino-edit-coreis feature-complete for v0.1 - ✅ Phase 4 —
taino-edit-dom: the contenteditable bridge (2026-05-20):EditorViewwith mount + incremental DOM diff/patch; bidirectionalSelection↔getSelection;read_dom_changes()for typing; IME composition lifecycle; clipboardpaste_text/paste_html(HTML sanitized throughSchema::parse_html); drag/drop primitives; focus + tabindex; node decorations. 46 wasm_bindgen_test cases pass in headless Chromium 148 via a small patch onwasm-bindgen-cli(vendored invendor/) +scripts/wasm-test.sh. Adapter-side event wiring (MutationObserver, selectionchange, paste/drop, composition events) lands in Phase 5 - ✅ Phase 5 —
taino-edit-leptosadapter (2026-05-20): the<TainoEditor>component backed by aRwSignal<EditorState>; mountsEditorViewon first reactive tick, patches in place on every change, and wiresinput/compositionstart/compositionend/pasteso browser-side edits commit back through the same signal.examples/basic-leptos/istrunk serve-buildable (Bold/Undo/Redo + editor). 6 wasm_bindgen_test cases run the component through Leptos's CSR runtime in headless Chromium - ✅ Phase 6 —
taino-edit-extensions: the v0.1 extension set (2026-05-21):Extensiontrait +SchemaAdditions+build_schema_with/build_keymap_withhelpers. Initially five built-ins (Bold,Italic,Heading,Paragraph,History) shipped through Phase 6. Then broadened mid-Phase-7 (2026-05-21) to 12 extensions so the published v0.1 is something the community can drop into a real project without first writing four extensions themselves: addedLink(withset_link/remove_link),Image(inline atom),Align(text_align on paragraph/heading),TransformCase(upper/lower),Blockquote,CodeBlock, andLists(bullet/ordered + list_item with wrap + lift). All built on the existing schema/command/keymap surface — nocoreAPI changes were needed for the broader cut. 41 extension tests + a keymap improvement (shift-implicit lookup for symbol keys, soMod->matches Ctrl+Shift+>) covered by their own host tests - ✅ Phase 7 — Polish for v0.1.0 (2026-05-21, code portion):
examples/headless-coreproves the core runs server-side; README rewritten with feature checklist + Leptos usage example; CHANGELOG[0.1.0]entry with explicit "Highlights" and "Known limitations" sections. All four CI gates green, 110 host tests + 52 wasm-bindgen-test cases pass. Also fixed a latent UX bug found while dog-fooding the demo:<TainoEditor>now listens fordocument.selectionchangeand mirrors the browser selection intostate.selection, so toolbar buttons that depend on the caret (H1/H2/H3, align, set_link, …) act on the right block. Only the maintainer-only release steps remain (publish to crates.io, tag, announce)
- 🚧 (nothing yet — release is the maintainer's hand-off)
- ⏳ Release
v0.1.0—cargo publishin dependency order, tagv0.1.0, post the GitHub Release and the announcements
Phases are sequential. Each ends in a state where cargo check, cargo test, cargo clippy -- -D warnings, and cargo doc --no-deps are all green — so the project is publishable (even if functionally incomplete) at every checkpoint.
Goal: six crates compile, CI green, repository is contribution-ready.
Effort: ~1 week.
Definition of done: cargo publish --dry-run succeeds for every crate.
✅ Met via cargo package --workspace (all six .crates build + verify).
Note: per-crate cargo publish --dry-run only passes for the dep-free crates
(core, dioxus); the others can't resolve unpublished workspace siblings
against crates.io until Phase 7's ordered publish — a known cargo limitation,
not a scaffold defect. cargo package --workspace is the correct pre-publish
gate and it is green.
- Initialize
gitrepo,.gitignorefor Rust + WASM artifacts -
rust-toolchain.tomlpinning channelstableand MSRV1.80 - Top-level
Cargo.tomlworkspace listingcrates/* - Create six crate skeletons under
crates/:-
taino-edit-core—#![no_std]-friendly where reasonable, zero web deps -
taino-edit-dom—web-sys,wasm-bindgen,js-sys -
taino-edit-extensions— depends oncore -
taino-edit-leptos— depends oncore+dom+leptos -
taino-edit-dioxus— empty placeholder,#![doc = "Reserved for v0.2"] -
taino-edit— umbrella crate, re-exports gated by features (leptos,dioxus,dom)
-
-
LICENSE-MIT+LICENSE-APACHEat repo root;license = "MIT OR Apache-2.0"andrepository,keywords,categoriesin everyCargo.toml(via[workspace.package]inheritance).documentationdeliberately omitted — one inherited URL would be wrong for every sub-crate; crates.io auto-links the correct per-crate docs.rs page -
README.md— pitch, status warning, install snippet, links to design docs -
CONTRIBUTING.md— build/test commands, PR conventions, code-of-conduct link -
CHANGELOG.md— Keep-a-Changelog format with## [Unreleased] -
.github/workflows/ci.ymlrunning on push and PR:-
cargo fmt --all -- --check -
cargo clippy --all-targets --all-features -- -D warnings -
cargo test --all-features -
cargo doc --no-deps --all-features
-
-
.github/dependabot.ymlfor monthly cargo and actions updates - Issue templates: bug, feature, RFC
-
deny.tomlforcargo-deny(advisories, licenses, bans)
Goal: a typed, traversable, serializable document tree. Effort: 2–3 weeks. Estimated LOC: ~1.5–2k. Definition of done: schema-validated documents round-trip through JSON without loss; unit tests cover traversal edge cases.
-
Node— element with type, attributes, content (Fragment), marks -
Mark— inline annotation with type and attributes -
Fragment— ordered, immutable sequence ofNodes -
Slice— fragment with open depths for cut-paste boundaries -
NodeType,MarkType— schema-bound type descriptors -
Schema+SchemaBuilder— the builder API (no macro yet) - Content expressions — minimal regex-like grammar for valid children (
"paragraph+","(text | image)*") — Thompson NFA → DFA, ProseMirror-compatible -
Pos(absolute) andResolvedPos(path + parent context) -
serde::Serialize/Deserializefor documents → JSON (schema-checked, round-trips without loss) - HTML serializer (one-way: doc → HTML string) — escaped output, schema-driven
to_dom - HTML parser (HTML string → doc), strict against schema — dependency-free tokenizer, depth-bounded, hostile-input-safe
- Snapshot tests for all of the above —
tests/model.rs(JSON round-trip + traversal) andtests/html.rs(round-trip, escaping, strictness, hostile input)
Goal: mutate documents through validated, invertible steps; persist editor state and selection. Effort: 2–3 weeks. Estimated LOC: ~2.5–3k. Definition of done: undo/redo correct across all step types; transform-against-step contract documented even if no concurrent path uses it yet.
-
Steptrait —apply,invert,map(&Mapping),to_json,from_json. Designed to support a futuremap_against(&Step)for CRDT/OT integration (documented on the trait). - Concrete steps:
-
ReplaceStep -
ReplaceAroundStep -
AddMarkStep -
RemoveMarkStep -
AttrStep
-
-
Mapping— composable position remap across multiple steps (StepMap + mirror/recover) -
Transform— fluent builder that accumulates steps + their mapping -
Selectionenum —Text,Node,All(positional mapping; "valid selection nearby" is a v0.2 refinement) -
EditorState— doc + selection + schema + history -
Transaction—Transform+ selection updates + history intent - [~]
Plugintrait +PluginKey— v0.1 cut: history is the one built-in stateful component; the generic typed-plugin registry is deferred to v0.2 (see Deferred) -
Historyplugin — bounded undo/redo stack with caller-driven grouping
Goal: the standard editing vocabulary that every WYSIWYG needs. Effort: ~1 week. Estimated LOC: ~1–1.5k. Definition of done: all baseKeymap commands have tests; toggleMark/setBlockType behave on selections of every shape.
-
Commandtype —Fn(&EditorState, Option<&mut Dispatch>) -> bool+chain - Selection-level commands:
delete_selection,select_all - Mark commands:
toggle_mark,set_mark,remove_mark - Block commands:
set_block_type,wrap_in,lift,split_block(+Transform::split) - Join commands:
join_backward,join_forward -
Keymapwith cross-platform modifier handling (Mod = Ctrl on Win/Linux, Cmd on macOS) -
base_keymap— Enter, Backspace, Delete, arrows, Home/End (+delete_backward/forward, caret motion) -
InputRules— regex-triggered transforms:text_replace_rule,textblock_type_rule(##→ heading),wrapping_rule(>→ blockquote)
Goal: render EditorState to the DOM, observe user edits, sync selection.
Effort: 2–3 weeks. Estimated LOC: ~2–3k. This is the riskiest phase — contenteditable is famously hostile.
Definition of done: a manual harness can type, select, apply marks, undo, paste plain text, and IME-compose without state desync, in Chromium and Firefox.
- [~]
NodeViewtrait — pluggable per-node-type rendering viaNodeSpec.to_dom/MarkSpec.to_dom(fromcore); a richer per-node-view trait with imperative DOM hooks is deferred to v0.2 - Default
ViewDesctree — mirrors document tree, holds DOM nodes - DOM diff/patch — minimal mutations on state change (text-only reuses the same DOM text node; identical subtrees untouched)
- [~]
MutationObserveradapter —EditorView::read_dom_changes()produces aTransformfrom DOM-side text edits; wiring an actualMutationObserverand dispatching is the adapter's job (Phase 5) - Selection sync —
window.getSelection()↔ coreSelection(set_selection/read_selection, bidirectional) - [~] Reentrancy guard — IME
composingflag covers the most acute case; aselectionchangeecho guard ships with the Phase 5 adapter event wiring - IME composition —
composition_start/composition_end;read_dom_changessuppresses transient glyph states - Clipboard —
paste_textandpaste_html(the latter sanitized throughSchema::parse_html; copy/cut are adapter-driven serialization of selection) - Drag-and-drop —
extract_slice+drop_slice(the actualdragstart/dropevent wiring andDataTransferserialization is adapter-side) - Focus management and
tabindex—focus/has_focus/set_tabindex; mount setstabindex="0"by default - [~] Decorations — node-level (
Decoration::Nodeadds a CSS class to a block); inline range decorations deferred to v0.2 (require text-node splitting that interacts with diff/patch)
Goal: an idiomatic Leptos component.
Effort: ~1 week. Estimated LOC: ~0.5–1k.
Definition of done: the example app builds with trunk serve and renders a working editor.
-
<TainoEditor>component — final prop shape is a singleRwSignal<EditorState>(cleaner than separate state + dispatch + plugins, since plugins are deferred to v0.2). Browser-side edits are committed back through the same signal. - Mount/unmount lifecycle —
Effect::newmounts theEditorViewon first reactive run and patches it on every state change;on_cleanupdrops the view + detaches every event listener - Bridge between Leptos signals and
dom-layer state pushes —EditorViewis kept in aStoredValue<…, LocalStorage>so the (Send+Sync) effect closures can reach the!Sendview through a Copy handle without echo loops - Public re-exports —
taino_edit_leptos::{SchemaBuilder, NodeSpec, MarkSpec, EditorState, Selection, Transaction, base_keymap, toggle_mark/set_mark/remove_mark, set_block_type/wrap_in/lift/split_block/join_…, EditorView, Decoration, …} - [~] Example pages under
examples/—examples/basic-leptos/is the v0.1 cut (Bold/Undo/Redo + editor,trunk serve-buildable, DoD met). A richer storybook-style multi-page suite is polish for the release-prep pass
Goal: a complete-enough extension set that the published v0.1 is something you can drop into a real project.
Effort: ~1–2 weeks. Estimated LOC: ~2–3k.
Definition of done: each extension is a single module exposing a schema_additions() and keymap_entries(), with host tests covering schema additions and the keymap dispatch.
-
Extensiontrait +SchemaAdditionsaggregation type +build_schema_with/build_keymap_withhelpers -
bold—Mod-b(strongmark, parses<strong>and<b>) -
italic—Mod-i(emmark, parses<em>and<i>) -
heading— h1/h2/h3 withMod-Alt-1..3(levelattr; parseh1/h2/h3) -
paragraph— base block,Mod-Alt-0(<p>) -
history—Mod-z/Mod-Shift-z. Threads through the standardCommand/Transactionpipeline by tagging aTransactionwith a newHistoryIntentthatEditorState::applyrecognises (and resolves toundo/redoinstead of pushing a new history entry) -
link—<a href title>mark withset_link(href, title?)andremove_linkcommands; no default keymap (the host wiresMod-kto a URL prompt) -
image— inline<img>atom withsrc/alt/titleattrs and aninsert_image(src, alt?)command -
align—text_alignattribute onparagraphandheading, withalign_left/center/right/justifycommands bound toMod-Shift-{l,e,r,j}; serializes asstyle="text-align: …" -
transform_case— selection-scopedto_uppercase/to_lowercasecommands; no default binding (case shortcuts collide with too many browser/window-manager bindings to ship a default) -
blockquote—<blockquote>wrapper bound toMod->(uses the new shift-implicit keymap lookup so symbol-key bindings work on US keyboards) -
code_block—<pre>block bound toMod-` -
lists—bullet_list/ordered_list/list_itemnodes pluswrap_in_bullet_list(Mod-Shift-8),wrap_in_ordered_list(Mod-Shift-7), andlift_list_item(Shift-Tab). Smart Enter and nested-list indent (sink) are deferred to v0.2 — they need a multi-levelsplit_at_depthstep the v0.1 budget couldn't absorb
Goal: publish.
Effort: 1–2 weeks.
Definition of done: all 6 crates on crates.io, docs.rs builds clean, examples/basic-leptos runs from a fresh checkout.
-
examples/basic-leptos— full editor demo usingtrunk(built in Phase 5) -
examples/headless-core— server-side document manipulation, no DOM - Crate-level rustdoc: every public item documented (
#![warn(missing_docs)]+ CIcargo doc -D warningsenforce it);core,dom,leptos, andextensionseach carry a working module-level example - [~]
README.mdupgrade — feature checklist + usage example landed; a screenshot/GIF is the one remaining nice-to-have (live demo is inexamples/basic-leptos) -
CHANGELOG.mdv0.1.0 entry (withHighlightsandKnown limitations / explicitly deferred to v0.2sections) - Publish to crates.io in dependency order — done 2026-05-21 (6 crates, v0.1.0)
- Tag
v0.1.0+ GitHub Release pointing at the CHANGELOG — done 2026-05-21 - [~] Announce — TWiR / r/rust / Leptos Discord pending the maintainer (drafts staged)
Goal: close the visible v0.1 gaps + broaden the platform so third parties can ship richer extensions without forking core.
-
split_list_itemcommand (multi-depth split: paragraph + list_item) -
sink_list_itemcommand (Tab to indent, nesting the current item into the previous sibling) - Multi-item
lift_list_itempreserves surviving siblings (single-item case still works) - Smart Enter (chain: split → lift-if-empty) and Tab wired in the
Listskeymap - New
Transform::split_at_depth(pos, levels, schema)helper
-
Plugintrait with associatedStatetype,init+apply(&Transaction)hooks -
PluginKey<P: Plugin>zero-sized typed handle -
EditorStateholds a typed-erased map of plugin states (EditorState::with_plugins,state.plugin(key)) - [~]
Historymigration onto the trait — kept grandfathered for v0.2 viaHistoryIntent; cosmetic migration tracked as v0.2.x
-
taino_edit_core::markdown::to_markdown(doc)(paragraphs, headings, blockquote, fenced code, bullet + ordered lists with start, strong/em/link marks, image) -
taino_edit_core::markdown::parse_markdown(schema, md)viapulldown-cmark0.13, schema-validated - DOM bridge:
EditorView::paste_markdown(md); Leptos adapter preferstext/markdownovertext/html/text/plain
-
taino_edit_dioxus::TainoEditormounts + DOM-patches on signal change -
examples/basic-dioxus(builds withdx serve) - [~] Full event-wiring parity (input → transform, IME, paste, selectionchange) — deferred to v0.2.x
- Workspace version bumped to 0.2.0; docs refreshed; full gate sweep;
cargo publish(6 crates); tagv0.2.0; GitHub Release.
- Full Dioxus event-wiring parity (input → transform round-trip, IME, paste, selectionchange) — done 2026-05-22; verified end-to-end in headless Chromium
- Dioxus example toolbar + keymap parity (Bold/Italic/H1–H3/Undo/Redo) — done 2026-05-22
- [~]
Migrate— decided against (2026-05-22). TheHistoryonto thePlugintraitPlugintrait is for observer plugins that fold state forward from transactions (apply(tx, prev, state) -> statecannot touch the doc).Historyis a driver: undo/redo rewrite the document via theHistoryIntentshort-circuit and mutate their own stacks outside the normal apply path. Forcing it onto the trait would either bloat the trait with history-specific hooks or be a fake migration that's still special-cased. History stays a first-classEditorStatefield; the Plugin trait stays clean for observers. - Formal
wasm_bindgen_testbrowser tests for the Dioxus adapter — done 2026-05-26;tests/component.rsmounts<TainoEditor>in a realdioxus-webtree in headless Chromium (paragraph + table-with-plugin)
Goal: full tables, done at production quality, on a reusable pointer-interaction platform.
-
Tableextension:table/table_row/table_cell, colspan/rowspan/header/colwidth, HTML round-trip - Structural commands (insert, add/delete row & column, delete table, header toggle) — span-correct via a logical-grid placement model + compaction render
-
Selection::Cellcore variant;TableMap;select_cell_range,merge_cells,split_cell -
set_column_width; Tab/Shift-Tab cell navigation (chained keymap so it coexists with Lists) -
ViewPlugininfrastructure intaino-edit-dom(DOM-aware event + decoration hooks,pos_at_point, nested-node decorations) - New crate
taino-edit-table-view—TableView: cell drag-select, selection highlight, column-resize - Leptos
<TainoEditor>pluginsprop + pointer wiring;basic-leptostable toolbar + drag/resize - Interaction + invariant host tests + headless-Chromium browser tests (table rendering, ViewPlugin infra, TableView)
- (none currently open)
-
Applying a mark/block type to a multi-word selection occasionally leaves the trailing word(s) unformatted— fixed 2026-06-12. Root cause: a race between theselectionchangemirror and the reactive effect's DOM-selection re-sync — the effect wrote the (by then stale) mirrored range back into the browser mid drag-select, clipping the selection's tail before the command ran. Mirror updates are now tagged (selection_from_dom) and the effect skips the write-back for them, in both adapters; deterministic regression browser tests added. -
The Dioxus adapter exposes fewer editing options than the Leptos one— fixed 2026-06-12. Parity audit done: the adapter itself was already at parity; the gap wasbasic-dioxus, which ran on 6 extensions. The demo now uses the same 13-extension set and full toolbar asbasic-leptos(inline code, link/image, blockquote, code-block, alignment, lists + lift, case transforms, select-all, − Row / − Col / column width).
-
schema!{}DSL — sugar over the builder — done 2026-05-27. Implemented as amacro_rules!macro (not a proc-macro, per DESIGN_NOTES §6: no new crate, no deps), re-exported from the umbrella + adapters. - 💤
lorointegration behindcollabfeature — collaborative editing via Peritext CRDT - 💤 Richer extensions: footnotes, mentions, math/KaTeX, embed
- Wire
TableViewinto the Dioxus adapter — done 2026-05-26;ViewPluginsprop + pointer wiring,basic-dioxustable toolbar, browser tests. Full event- and plugin-wiring parity with Leptos. - Inline (range-level) decorations for third-party UI (search highlight, comments) — done 2026-05-26;
Decoration::Inline, drawn as an overlay layer (no text-node splitting, so the diff/patch read-back is untouched), contributed viaViewPlugin::decorations. Browser-tested incl. a read-back-safety test. - 💤 Server-side rendering of the initial document (Leptos SSR)
- ❄️ Real-time collaborative cursors / presence
- ❄️
taino-edit-blitzortaino-edit-freyanative (non-DOM) renderers - ❄️ Mobile touch gestures beyond the contenteditable defaults
- ❄️ Full WCAG audit (basic accessibility yes; certified audit no)
- ❄️ Mentions, autocomplete, slash menus
- ❄️ Track changes, comments, suggestion mode
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Contenteditable cross-browser bugs (especially Safari) | High | High | Phase 4 includes a manual test matrix; Safari support may be marked "best effort" in v0.1 |
| IME composition correctness for CJK input | Medium | High | Dedicated composition lifecycle in Phase 4; recruit testers from Discord before release |
| Selection-sync feedback loops between MutationObserver and our own writes | High | Medium | Reentrancy guard built in from day one; integration tests with synthetic mutations |
| Performance on documents >10k nodes | Medium | Medium | v0.1 targets typical-sized docs; rope-based text storage deferred to v0.2 if needed |
Step design forecloses CRDT integration |
Low | High | map_against(&Step) contract documented in Phase 2 even though no caller uses it yet |
| Scope creep past LOC budget | Medium | Medium | This roadmap is the gate; new work goes into "Deferred" unless it unblocks v0.1 |
- Branching: trunk-based on
main; topic branches for anything non-trivial. - Commits: Conventional Commits (
feat:,fix:,docs:,refactor:,test:,chore:). - PRs: every PR ticks at least one checkbox in this file or moves an item between sections.
- Reviews: solo project for now; treat the CI matrix as the reviewer that never sleeps.
- Issue triage: label by phase (
phase-0…phase-7) and crate (crate:core, etc.).
This document lags the code by zero commits — if main says feature X is shipped, this file must say so too. PRs that change behavior should update the relevant phase checklist in the same commit.