Skip to content

Commit b96fe38

Browse files
committed
doc: update README.md
1 parent 37ea034 commit b96fe38

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,19 @@ Create an SVG element with explicit width and height:
9696
Render a markmap to the SVG element:
9797

9898
```js
99-
import { markmap } from 'markmap-lib/dist/view';
99+
import { Markmap } from 'markmap-lib/dist/view';
100100

101-
markmap('#markmap', data);
101+
Markmap.create('#markmap', null, data);
102102

103103
// or pass an SVG element directly
104104
const svgEl = document.querySelector('#markmap');
105-
markmap(svgEl, data);
105+
Markmap.create(svgEl, null, data);
106106
```
107107

108108
### Plugins
109109

110-
- MathJax
111-
- PrismJS
110+
- `mathJax` - MathJax
111+
- `prism` - PrismJS
112112

113113
#### Command-line
114114

@@ -123,14 +123,14 @@ $ markmap note.md --enable-mathjax --enable-prism
123123
`loadPlugins` loads necessary CSS and JavaScript files.
124124

125125
```js
126-
import { markmap, loadPlugins } from 'markmap-lib/dist/view';
126+
import { Markmap, loadPlugins } from 'markmap-lib/dist/view';
127127

128128
loadPlugins([
129129
'mathJax',
130130
'prism',
131131
])
132132
.then(() => {
133-
markmap('#markmap', data);
133+
Markmap.create('#markmap', null, data);
134134
});
135135
```
136136

0 commit comments

Comments
 (0)