You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!DOCTYPE html><html><head><metacharset="UTF-8" />
<metaname="viewport" content="width=device-width, initial-scale=1.0" />
</head><body><svgid="mindmap" style="width: 100vw; height: 100vh"></svg><scriptsrc="https://unpkg.com/[email protected]/dist/browser/index.min.js"></script><scriptsrc="https://unpkg.com/[email protected]/dist/d3.min.js"></script><scriptsrc="https://unpkg.com/[email protected]/dist/index.min.js"></script><preid="mm" hidden>
# foobar
## foo
- f
- o
- o
## bar
- b
- a
- r
</pre><script>letmarkdown=document.getElementById("mm").innerHTML;// load with <script>const{ markmap }=window;const{ Markmap, loadCSS, loadJS, Transformer }=markmap;console.log(markmap);console.log(Transformer);consttransformer=newTransformer();// 1. transform Markdownconst{ root, features }=transformer.transform(markdown);// 2. get assets// either get assets required by used featuresconst{ styles, scripts }=transformer.getUsedAssets(features);// or get all possible assets that could be used later//const { styles, scripts } = transformer.getAssets(features);// 1. load assetsif(styles)loadCSS(styles);if(scripts)loadJS(scripts,{getMarkmap: ()=>markmap});// 2. create markmap// `options` is optional, i.e. `undefined` can be passed hereMarkmap.create("#mindmap",null,root);</script></body></html>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Beta Was this translation helpful? Give feedback.
All reactions