rte: opt-in 'table' token with GFM-constrained round-trip (no creation UI yet) #94
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle#94
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Add
tableas a ninth rte formatting token — opt-in only. The default allow-set stays the current 8 tokens;tablemust be named explicitly in an element'sallow:list. Enable it intext.yamlby givingtextan explicit allow list (the 8 defaults +table).Editor side: wire tiptap's table extension GFM-constrained so pipe tables stored in bodies render in the rte editor and survive an edit/save cycle losslessly. Constraints: no merged cells (merge/split disabled), cells hold inline content only, first row is always the header row, no column resizing persisted. Serialization target is a plain GFM pipe table in the markdown body — the no-raw-HTML server gate is untouched.
This slice ships no table-creation UI — its value is that agent-authored pipe tables render correctly and are not destroyed when a human edits the surrounding text. Creation/editing affordances are the follow-up slice.
Contract updates in the same change (per CLAUDE.md): Go allow-set (
internal/element/schema.go), TS mirror (web/src/rte/allow.ts),scaffold/site/AGENTS.md— including rewording "omitting allow = full set" to "omitting allow = default set (all tokens except table)" — and theagentsdoc_test.godrift expectations.Acceptance criteria
tableis a valid rte token in Go and TS allow-sets; drift test passesallowdo NOT gain tablestext.yamlexplicitly allows the 8 defaults +tabletablerejects/strips table content per existing rte enforcementBlocked by
None - can start immediately
Triage confirmed — enhancement, ready-for-agent. The issue body is the authoritative agent brief.
Verified against the codebase: the current 8-token allow-set is confirmed in both
internal/element(defaultRTEAllow) and the TS mirrorweb/src/rte/allow.ts, whose doc comment carries exactly the "omitting allow = full set" wording this issue says to reword. The issue already names every contract surface CLAUDE.md requires (Go set, TS mirror, AGENTS.md, drift test) — treat that list as binding.