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-it is 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.
This issue tracks the high-level plan to decouple Markmap from the browser DOM and shift its core architecture.
Current Situation & Pain Points
<foreignObject>, making it impossible to run natively in Node.js, CLI tools, or SSR.<foreignObject>introduces inconsistent sizing and rendering bugs across different browser engines (especially Safari).markdown-itis optimized for HTML string generation rather than manipulating a structured syntax tree for node layouts.Future Improvements