Skip to content

Commit d0970d6

Browse files
committed
docs: update readme
1 parent 69afe8f commit d0970d6

File tree

1 file changed

+18
-34
lines changed

1 file changed

+18
-34
lines changed

readme.md

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,33 +38,24 @@ Mind elixir is a free open source mind map core.
3838
<details>
3939
<summary>Table of Contents</summary>
4040

41-
- [Doc](#doc)
4241
- [Try now](#try-now)
4342
- [Playground](#playground)
44-
- [Vanilla JS](#vanilla-js)
45-
- [Use with React](#use-with-react)
46-
- [Use with Vue](#use-with-vue)
47-
- [Use with Vue3](#use-with-vue3)
4843
- [Usage](#usage)
4944
- [Install](#install)
5045
- [NPM](#npm)
5146
- [Script tag](#script-tag)
52-
- [HTML structure](#html-structure)
5347
- [Init](#init)
5448
- [Data Structure](#data-structure)
5549
- [Event Handling](#event-handling)
5650
- [Data Export And Import](#data-export-and-import)
5751
- [Operation Guards](#operation-guards)
52+
- [Methods](#methods)
5853
- [Theme](#theme)
5954
- [Not only core](#not-only-core)
6055
- [Development](#development)
6156

6257
</details>
6358

64-
## Doc
65-
66-
https://doc.mind-elixir.com/
67-
6859
## Try now
6960

7061
![mindelixir](https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/screenshot2.png)
@@ -73,21 +64,10 @@ https://mind-elixir.com/
7364

7465
### Playground
7566

76-
#### Vanilla JS
77-
78-
https://codepen.io/ssshooter/pen/rNqGpwW
79-
80-
#### Use with React
81-
82-
https://codesandbox.io/s/mind-elixir-2-x-react-q9glxt
83-
84-
#### Use with Vue
85-
86-
https://codesandbox.io/s/mind-elixir-vue-nqjjl
87-
88-
#### Use with Vue3
89-
90-
https://codesandbox.io/s/mind-elixir-vue3-dtcq6u
67+
- Vanilla JS - https://codepen.io/ssshooter/pen/OJrJowN
68+
- React - https://codesandbox.io/s/mind-elixir-3-x-react-18-x-vy9fcq
69+
- Vue3 - https://codesandbox.io/s/mind-elixir-3-x-vue3-lth484
70+
- Vue2 - https://codesandbox.io/s/mind-elixir-3-x-vue-2-x-5kdfjp
9171

9272
## Usage
9373

@@ -100,7 +80,7 @@ npm i mind-elixir -S
10080
```
10181

10282
```javascript
103-
import MindElixir, { E } from 'mind-elixir'
83+
import MindElixir from 'mind-elixir'
10484
```
10585

10686
#### Script tag
@@ -109,7 +89,7 @@ import MindElixir, { E } from 'mind-elixir'
10989
<script src="https://cdn.jsdelivr.net/npm/mind-elixir/dist/MindElixir.js"></script>
11090
```
11191

112-
### HTML structure
92+
### Init
11393

11494
```html
11595
<div id="map"></div>
@@ -121,12 +101,10 @@ import MindElixir, { E } from 'mind-elixir'
121101
</style>
122102
```
123103

124-
### Init
125-
126104
**Breaking Change** since 1.0.0, `data` should be passed to `init()`, not `options`.
127105

128106
```javascript
129-
import MindElixir, { E } from 'mind-elixir'
107+
import MindElixir from 'mind-elixir'
130108
import example from 'mind-elixir/dist/example1'
131109

132110
let options = {
@@ -174,7 +152,7 @@ const data = MindElixir.new('new topic')
174152
mind.init(data)
175153

176154
// get a node
177-
E('node-id')
155+
MindElixir.E('node-id')
178156
```
179157

180158
### Data Structure
@@ -272,6 +250,10 @@ let mind = new MindElixir({
272250
})
273251
```
274252

253+
## Methods
254+
255+
https://github.com/ssshooter/mind-elixir-core/blob/master/api/mind-elixir.api.md
256+
275257
## Theme
276258

277259
```javascript
@@ -287,6 +269,8 @@ const options = {
287269
'--main-bgcolor': '#4c4f69',
288270
'--color': '#cccccc',
289271
'--bgcolor': '#252526',
272+
'--panel-color': '255, 255, 255',
273+
'--panel-bgcolor': '45, 55, 72',
290274
},
291275
// all variables see /src/index.less
292276
},
@@ -307,11 +291,12 @@ mind.changeTheme({
307291
})
308292
```
309293

310-
Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`. Please change the theme manually when the scheme changes.
294+
Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`. Please change the theme **manually** when the scheme changes.
311295

312296
## Not only core
313297

314298
- [@mind-elixir/node-menu](https://github.com/ssshooter/node-menu)
299+
- [@mind-elixir/node-menu-neo](https://github.com/ssshooter/node-menu-neo)
315300
- [@mind-elixir/export-xmind](https://github.com/ssshooter/export-xmind)
316301
- [@mind-elixir/export-html](https://github.com/ssshooter/export-html)
317302
- [@mind-elixir/export-image](https://github.com/ssshooter/export-image) (WIP🚧)
@@ -320,7 +305,7 @@ Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`.
320305
## Development
321306

322307
```
323-
yarn
308+
pnpm i
324309
npm start
325310
```
326311

@@ -330,5 +315,4 @@ Test generated files with `dev.dist.ts`:
330315
npm run build
331316
npm link
332317
npm link mind-elixir
333-
npm run startd
334318
```

0 commit comments

Comments
 (0)