The full v0.1 surface in a single page: a <TainoEditor> plus a complete
toolbar (Bold / Italic / Paragraph / H1–H3 / Undo / Redo / Select all),
the standard Mod-… keymap wired on keydown, and a live JSON + HTML
preview of the doc so you can see the model react to every edit.
# Once, if you don't have trunk yet:
cargo install --locked trunk
# Then, from this directory:
trunk serve --openTrunk builds the binary to wasm32-unknown-unknown, bundles it via the
<link data-trunk rel="rust"> in index.html, and serves it at
http://127.0.0.1:8080.
The page also embeds a <details> block with this same list. Each item
should produce a visible effect in the editor and in the live JSON /
HTML panels:
- Caret-only is a noop. Click in a word and press
Mod-b— strong should NOT apply (carets don't carry stored marks in v0.1). - Toggle marks on a selection. Select a word, press
Mod-b, watch<strong>appear in both panels. Same withMod-i. - Change block type via shortcut. Place the caret in a paragraph,
press
Mod-Alt-2. The paragraph becomes anh2.Mod-Alt-0turns it back. - Undo / redo through the keymap. Type some text, press
Mod-z. The "Undo (Mod-z)" counter shrinks and the doc rolls back. PressMod-Shift-zto redo. - Typing reaches the state signal. Just type — the JSON panel should track every character.
- Plain-text paste. Copy text from any other tab and paste in. No markup leaks; only the characters land.
- HTML paste is sanitized. Copy a fragment from a news article and
paste it. Only the schema-known tags survive (
<p>,<strong>,<em>,h1/h2/h3). Try<script>— it never reaches the doc. - IME doesn't desync. If you have a CJK / accented-input IME available, type something — only the committed glyphs should appear, never the intermediate ones (the JSON panel stays stable while you compose).
- Toolbar buttons run the same commands. Click "Bold" — same
effect as
Mod-b. - Mod-a selects everything. Then
Mod-bbolds the whole doc.
If anything misbehaves, the matching invariant is documented in
ROADMAP.md (Phase 4 for DOM bridge, Phase 5 for the Leptos wiring).