@@ -38,7 +38,7 @@ Mind elixir is a free open source mind map core.
3838 - [ Init] ( #init )
3939 - [ Data Structure] ( #data-structure )
4040 - [ Event Handling] ( #event-handling )
41- - [ Data Export] ( #data-export )
41+ - [ Data Export And Import ] ( #data-export-and-import )
4242 - [ Operation Guards] ( #operation-guards )
4343- [ Not only core] ( #not-only-core )
4444
@@ -177,6 +177,7 @@ nodeData = {
177177 hyperLink: ' https://github.com/ssshooter/mind-elixir-core' ,
178178 image: {
179179 url: ' https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo.png' , // required
180+ // you need to query the height and width of the image and calculate the appropriate value to display the image
180181 height: 90 , // required
181182 width: 300 , // required
182183 },
@@ -216,12 +217,20 @@ mind.bus.addListener('expandNode', node => {
216217})
217218```
218219
219- ### Data Export
220+ ### Data Export And Import
220221
221222``` javascript
222- mind .getAllData () // javascript object, see src/example.js
223+ // data export
224+ const data = mind .getAllData () // javascript object, see src/example.js
223225mind .getAllDataString () // stringify object
224226mind .getAllDataMd () // markdown
227+
228+ // data import
229+ // initiate
230+ let mind = new MindElixir (options)
231+ mind .init (data)
232+ // data update
233+ mind .refresh (data)
225234```
226235
227236### Operation Guards
@@ -253,3 +262,4 @@ let mind = new MindElixir({
253262- [ @mind-elixir/export-xmind ] ( https://github.com/ssshooter/export-xmind )
254263- [ @mind-elixir/export-html ] ( https://github.com/ssshooter/export-html )
255264- [ @mind-elixir/export-image ] ( https://github.com/ssshooter/export-image ) (WIP🚧)
265+ - [ mind-elixir-react] ( https://github.com/ssshooter/mind-elixir-react )
0 commit comments