https://github.com/leungwensen/xmind-sdk-javascript
XMind SDK for javascript (IN BOTH NODE.JS & BROWSERS)
https://github.com/leungwensen/xmind-sdk-javascript
javascript mindmap xmind xmind-sdk
Last synced: about 2 months ago
JSON representation
XMind SDK for javascript (IN BOTH NODE.JS & BROWSERS)
- Host: GitHub
- URL: https://github.com/leungwensen/xmind-sdk-javascript
- Owner: leungwensen
- License: mit
- Created: 2015-07-09T14:34:47.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T03:05:19.000Z (over 3 years ago)
- Last Synced: 2025-04-11T11:50:30.507Z (about 2 months ago)
- Topics: javascript, mindmap, xmind, xmind-sdk
- Language: JavaScript
- Homepage:
- Size: 1.19 MB
- Stars: 143
- Watchers: 7
- Forks: 26
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
xmind-sdk-javascript
====================XMind SDK for javascript (IN BOTH NODE.JS & BROWSERS)
## Usage (see [API reference](doc/api.md) for more information)
```shell
npm install xmind
``````javascript
var xmind = require('xmind'),
Workbook = xmind.Workbook;// open xmind file
var workbookFromFile = xmind.open('path/to/xmind-file.xmind');// creating a new xmind file
var workbook = new Workbook({
firstSheetId: 'sheet-1',
firstSheetName: 'primary sheet',
rootTopicId: 'topic-1',
rootTopicName: 'root topic'
});// saving an xmind file
workbook.save('path/to/new-xmind-file.xmind');
// or
xmind.save(workbook, 'path/to/new-xmind-file.xmind');// output as JSON String
workbook.toJSON();// get the primary sheet
var sheet = workbook.getPrimarySheet();
// add a new sheet
var newSheet = workbook.addSheet(/*options*/);// get the root topic
var rootTopic = sheet.rootTopic;// add a subtopic
var subTopic = rootTopic.addChild(/*options*/);
```## [API reference](doc/api.md)
## Thanks to
xmind-sdk-javascript is built on top of all these fantastic projects:
* [Stuk/jszip](https://github.com/Stuk/jszip.git)
* [eligrey/FileSaver.js](https://github.com/eligrey/FileSaver.js.git)
* [jindw/xmldom](https://github.com/jindw/xmldom.git)and these projects helps a lot, too:
* [xmindltd/xmind-sdk-python](https://github.com/xmindltd/xmind-sdk-python.git)
* [xmindltd/xmind](https://github.com/xmindltd/xmind.git)
* [Mekk/mekk.xmind](https://bitbucket.org/Mekk/mekk.xmind)## [History](doc/history.md)
## [License (MIT License)](doc/license.md)