Context
The CMS rich text editor uses the community tiptap-markdown package (v0.9.0) for bidirectional markdown support. This package has a confirmed, unfixed bug where markdown pipe tables are not parsed into editable ProseMirror table nodes — they render visually but cells are not interactive (GitHub issues #81, #95). The package is effectively abandoned (no maintainer activity on open issues).
Tiptap v3 ships an official @tiptap/markdown package (v3.22.3) with native table support and a different extension API (parseMarkdown/renderMarkdown on each extension instead of addStorage().markdown.serialize/parse).
Scope
Migrate from tiptap-markdown to @tiptap/markdown. This requires:
- Install
@tiptap/markdown and remove tiptap-markdown
- Rewrite 5 custom extensions to the new
parseMarkdown/renderMarkdown API:
ArchetypeReference — [[archetype:slug]] syntax
CardReference — [[card:SET-NUM]] syntax
DeckReference — [[deck:SHORT_TAG]] syntax
HeadingWithId — Pandoc-style {#id} anchors
ResizableImage — Pandoc-style {.class style="..."} attributes
- Update
MarkdownEditor.tsx — replace the Markdown import and config
- Verify table round-trip — pipe tables must parse into editable ProseMirror table nodes and serialize back correctly
- Verify all custom tags —
[[card:...]], [[archetype:...]], [[deck:...]] must round-trip correctly
- Update tests in
assets/test/
References
- Official docs: https://tiptap.dev/docs/editor/markdown
- Custom extension integration:
parseMarkdown(token, helpers) / renderMarkdown(node, helpers)
- Current custom extensions:
assets/extensions/
- Current editor:
assets/components/MarkdownEditor.tsx
Acceptance criteria
Context
The CMS rich text editor uses the community
tiptap-markdownpackage (v0.9.0) for bidirectional markdown support. This package has a confirmed, unfixed bug where markdown pipe tables are not parsed into editable ProseMirror table nodes — they render visually but cells are not interactive (GitHub issues #81, #95). The package is effectively abandoned (no maintainer activity on open issues).Tiptap v3 ships an official
@tiptap/markdownpackage (v3.22.3) with native table support and a different extension API (parseMarkdown/renderMarkdownon each extension instead ofaddStorage().markdown.serialize/parse).Scope
Migrate from
tiptap-markdownto@tiptap/markdown. This requires:@tiptap/markdownand removetiptap-markdownparseMarkdown/renderMarkdownAPI:ArchetypeReference—[[archetype:slug]]syntaxCardReference—[[card:SET-NUM]]syntaxDeckReference—[[deck:SHORT_TAG]]syntaxHeadingWithId— Pandoc-style{#id}anchorsResizableImage— Pandoc-style{.class style="..."}attributesMarkdownEditor.tsx— replace theMarkdownimport and config[[card:...]],[[archetype:...]],[[deck:...]]must round-trip correctlyassets/test/References
parseMarkdown(token, helpers)/renderMarkdown(node, helpers)assets/extensions/assets/components/MarkdownEditor.tsxAcceptance criteria
[[card:...]],[[archetype:...]],[[deck:...]]) round-trip correctly