https://github.com/neroblackstone/markdown-it-mindmap
A markdown-it plugin for markmap.
https://github.com/neroblackstone/markdown-it-mindmap
markdown-it markdown-it-plugin
Last synced: about 1 year ago
JSON representation
A markdown-it plugin for markmap.
- Host: GitHub
- URL: https://github.com/neroblackstone/markdown-it-mindmap
- Owner: NeroBlackstone
- License: agpl-3.0
- Created: 2021-10-17T04:48:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-17T06:07:32.000Z (over 4 years ago)
- Last Synced: 2025-02-08T22:46:47.467Z (about 1 year ago)
- Topics: markdown-it, markdown-it-plugin
- Language: JavaScript
- Homepage: https://deno.land/x/markdown_it_mindmap
- Size: 18.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# markdown-it-mindmap
A [markdown-it](https://github.com/markdown-it/markdown-it) plugin add latest [markmap](https://markmap.js.org/) support.
## Usage
### Deno
> This package has only been tested on Deno. But it should also work with node.js.
Import the module from [deno.land/x](https://deno.land/x/markdown_it_mindmap@0.1.1):
``` js
import markmap from "https://deno.land/x/markdown_it_mindmap@0.1.0/index.js"
const mdi = markdownIt();
mdi.use(markmap);
let mindmapContent = `
\`\`\`mindmap
## Links
-
- [GitHub](https://github.com/gera2ld/markmap)
## Related
- [coc-markmap](https://github.com/gera2ld/coc-markmap)
- [gatsby-remark-markmap](https://github.com/gera2ld/gatsby-remark-markmap)
## Features
- links
- **inline** ~~text~~ *styles*
- multiline
text
- `inline code`
\`\`\``;
console.log(mdi.render(mindmapContent));
```
Add needed libraries in browser:
``` html
import { Markmap, } from 'https://jspm.dev/markmap-view';
const mindmaps = document.querySelectorAll('.markmap-svg');
for(const mindmap of mindmaps) {
Markmap.create(mindmap,null,JSON.parse(mindmap.getAttribute('data-json')));
}
```
## Output
