Use mindmap in VS Code's built-in Markdown preview with markmap, seamlessly supporting both hexo-markmap
tags and markmap
code blocks.
- Real-time Markmap Preview
hexo-markmap
Tag Support:- Recognize
{% markmap %}...{% endmarkmap %}
syntax. - Provide folding for
hexo-markmap
tags.
- Recognize
- Code Block Support:
- Render fenced code blocks with the
markmap
language identifier.
- Render fenced code blocks with the
- Customizable Preview:
- Adjust styles and options via frontmatter.
- Compatible with remark-markmap and hexo-markmap.
- Syntax highlighting: (Still have some issues)
- Highlight Markmap frontmatter and Markdown content.
{% markmap %}
---
markmap:
colorFreezeLevel: 2
---
# Markdown
# Syntax
{% endmarkmap %}
```markmap
---
markmap:
colorFreezeLevel: 2
---
# Markdown
# Syntax
```
You can customize each mindmap individually in the markmap
tag.
All frontmatter options are optional.
-
id
: Used to define the ID of themarkmap-wrap
element. -
markmap
: Correspond to theIMarkmapJSONOptions
in the markmap project. For more details, please refer tojsonOptions
.- alias:
options
(for backward compatibility)
- alias:
Difference between markmap
and options
-
markmap
(from markmap-lib) Will be preprocessed (converting strings to arrays or numbers) and overrides the legacyoptions
.- E.g.,
color: 'red'
will be converted tocolor: ['red']
, only the latter is valid inmarkmap-view
. - ✅ Recommended for consistent use with
markmap
.
- E.g.,
-
options
(from markmap-universe) Passed directly to markmap-view.- ❌ Not recommended, maintained only for backward compatibility.
You can also specify the height of the mindmap directly in the tag, by default it will be calculated based on the content.
{% markmap 300px %}
# Markdown
# Syntax
{% endmarkmap %}
markmap-universe.globalOptions
- Type:
object
: Global options for all mindmaps. Correspond to themarkmap
inFrontmatter Options
. - Default:
{}
markmap-universe.toolbar
- Type:
boolean
: Show the toolbar. - Default:
true
References to the following projects: