Repository navigation
Proposal: a source-preserving Markdown editor (math, in-place tables) for the Markdown viewer #35497
XueyanZhang
started this conversation in
Ideas
Replies: 2 comments
|
@teamleaderleo since you built NEXT's Markdown page, I'd especially value your take on question 1 (main vs NEXT vs neither). Happy to run the fidelity comparison on your 35-file corpus if that would help decide. |
0 replies
|
Quick update: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Disclosure: I'm the author of
@openmarkdown-dev/editor(MIT), the library this proposal uses. I drafted this with an AI assistant and reviewed every claim below. Nothing here is a PR yet; I'd like a direction call before opening one.What changes for a reader
A Markdown file opened in cmux renders math, Mermaid diagrams and tables, and an Edit button switches the same view into a live editor: the Markdown shows only under the caret, a table cell is edited where it's drawn, and Save writes back only what you changed. Opening and saving without edits writes the file's original bytes, including its BOM, CRLF line endings and missing final newline.
The same five states as stills
The header stays at ✓ (no unsaved changes) through all of these: moving the caret doesn't change the file.
Issues this would address
$…$and$$…$$render (with Temml), inline and display, in reading and editing.`applications/<app>/<env>/terraform/`shows literal<app>, with no<. (Its second case, inline code inside<details>, differs: raw HTML shows as source, see Limitations.)How it fits cmux
I built a working prototype on top of
main's macOS Markdown panel (a local branch, not pushed):I know cmux NEXT already has a Markdown page (Milkdown with a block-level source map, conflict handling and link routing). The differences I see:
Evidence
All from the tagged dev build on macOS 15.7, driven through the UI:
_em_, a+list, a two-space hard break, a tab, escapes, a combining accent and an unaligned table:cmpagainst the original passes.git diffshows only those bytes; BOM, CRLFs and the missing final newline are kept.python3 scripts/verify-local.pypasses; the new routing and save-decision tests pass in theCmuxAgentChatpackage.Limitations today
<details>,<br>) shows as source, not rendered.Questions for maintainers
main's Markdown panel, for NEXT's Markdown page, or neither?All reactions