Tracking Issue: Markmap Next Architecture
Author: gera2ldCreated Jun 21, 2026Updated Jun 21, 2026
This issue tracks the high-level plan to decouple Markmap from the browser DOM and shift its core architecture.
Current Situation & Pain Points
- Environment Lock-in: The core layout engine is tightly coupled with the browser DOM and
<foreignObject>, making it impossible to run natively in Node.js, CLI tools, or SSR. - Rendering Issues:
<foreignObject>introduces inconsistent sizing and rendering bugs across different browser engines (especially Safari). - Parser Limits:
markdown-itis optimized for HTML string generation rather than manipulating a structured syntax tree for node layouts.
Future Improvements
- Markdown as a DSL: Shift the goal from "rendering a full Markdown document" to "using Markdown syntax as a lightweight DSL to quickly structure and draw a mindmap."
- Pure SVG Core: Remove all DOM and HTML-specific dependencies. The core will focus purely on tree layout and standard SVG rendering.
- Plugin Architecture: Move heavy or advanced features (HTML nodes, MathJax/KaTeX) out of the core and into optional plugins.
Source: markmap/markmap