ProseMirror Product Developer: Under Tree-Based Document Architecture, Your Markdown Source Is Lost on the First Save
A developer with three years of experience building ProseMirror-based products argues, through a version-by-version review of mainstream Markdown conversion library source code, that when a JSON document tree is the source of truth and Markdown is merely its serialized output, the user's original writing is inevitably altered upon the first save. They propose an alternative approach where the Markdown source itself is authoritative, implemented via CodeMirror 6's decoration system for WYSIWYG editing, providing specific benchmark data on incremental parsing and explaining architectural differences in collaborative editing.
A developer with three years of experience working on ProseMirror-related products published a long-form post on V2EX, reviewing the source code of mainstream Markdown conversion libraries version by version. They present an architectural judgment: when the authority of a document lies in its JSON tree and Markdown is merely one way to print it, the source code you wrote is already gone by the time you hit save for the first time.
They cite examples from the most commonly used implementations. prosemirror-markdown 1.13.4 hardcodes italics and bold as asterisks; underline emphasis you write changes after one save. Unordered lists default to asterisks, so your habit of using hyphens disappears. Ordered lists are renumbered, and line-ending double spaces for line breaks are uniformly changed to backslashes. If it encounters syntax it doesn't recognize, it throws an error; the default schema lacks tables, footnotes, and strikethrough. Tiptap's official @tiptap/markdown 3.30 similarly hardcodes bold and italic formatting. Nodes without corresponding renderers output empty strings, causing content to silently disappear. The community-maintained tiptap-markdown has ceased maintenance; when encountering nodes it cannot express, it outputs placeholders. Tables with merged cells degrade to HTML, losing column alignment information.
The author emphasizes these are not bugs but inevitable results of the architecture. Since there is only one printing method, the source code you wrote is already gone upon the first save. This might not matter for personal note-taking, but it is critical for three scenarios: documents stored in Git show full-screen format changes even when modifying a single character; AI modifies only one section but normalizes the writing style of the entire document; the same file needs to be used across VS Code, static site generators, and other Markdown tools.