Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hizzgdev committed Oct 18, 2023
1 parent 17a7081 commit 0ba01d5
Show file tree
Hide file tree
Showing 17 changed files with 259 additions and 174 deletions.
11 changes: 6 additions & 5 deletions docs/en/1.usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[Table of Contents](index.md)

* [1. Usage *](1.usage.md)
* [2. Options](2.options.md)
* [3. Operation](3.operation.md)
* [Usage *](1.usage.md)
* [Options](2.options.md)
* [Operation](3.operation.md)
* [Experimental Features](experimental-features.md)
* [Screenshot (Export as Image)](plugin-screenshot.md)
* [Contribution](4.contribution.md)
* [Development Guide](5.development.md)

Expand All @@ -22,8 +23,8 @@ At first, 2 files (jsmind.css and jsmind.js) are required. Here we link to the r
> - https://unpkg.com/jsmind@0.7.4/es6/jsmind.js
> - https://cdn.jsdelivr.net/npm/jsmind@0.7.4/es6/jsmind.js
> - https://jsd.onmicrosoft.cn/npm/jsmind@0.7.4/es6/jsmind.js
> Version: the version number appear in the url of CDN. It's strongly recommended that you also specify the version number in your project to avoid the risks that caused by version upgrades. Access the [jsMind on NPM](https://www.npmjs.com/package/jsmind) to get the latest version number of jsMind.
>
> The version number appear in the url of CDN. It's strongly recommended that you also specify the version number in your project to avoid the risks that caused by version upgrades. Access the [jsMind on NPM](https://www.npmjs.com/package/jsmind) to get the latest version number of jsMind.
Add script jsmind.draggable-node.js for enabling draggable node feature.

Expand Down
7 changes: 4 additions & 3 deletions docs/en/2.options.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[Table of Contents](index.md)

* [1. Usage](1.usage.md)
* [2. Options *](2.options.md)
* [3. Operation](3.operation.md)
* [Usage](1.usage.md)
* [Options *](2.options.md)
* [Operation](3.operation.md)
* [Experimental Features](experimental-features.md)
* [Screenshot (Export as Image)](plugin-screenshot.md)
* [Contribution](4.contribution.md)
* [Development Guide](5.development.md)

Expand Down
7 changes: 4 additions & 3 deletions docs/en/3.operation.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[Table of Contents](index.md)

* [1. Usage](1.usage.md)
* [2. Options](2.options.md)
* [3. Operation *](3.operation.md)
* [Usage](1.usage.md)
* [Options](2.options.md)
* [Operation *](3.operation.md)
* [Experimental Features](experimental-features.md)
* [Screenshot (Export as Image)](plugin-screenshot.md)
* [Contribution](4.contribution.md)
* [Development Guide](5.development.md)

Expand Down
7 changes: 4 additions & 3 deletions docs/en/4.contribution.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[Table of Contents](index.md)

* [1. Usage](1.usage.md)
* [2. Options](2.options.md)
* [3. Operation](3.operation.md)
* [Usage](1.usage.md)
* [Options](2.options.md)
* [Operation](3.operation.md)
* [Experimental Features](experimental-features.md)
* [Screenshot (Export as Image)](plugin-screenshot.md)
* [Contribution *](4.contribution.md)
* [Development Guide](5.development.md)

Expand Down
9 changes: 5 additions & 4 deletions docs/en/5.development.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[Table of Contents](index.md)

* [1. Usage](1.usage.md)
* [2. Options](2.options.md)
* [3. Operation](3.operation.md)
* [Usage](1.usage.md)
* [Options](2.options.md)
* [Operation](3.operation.md)
* [Experimental Features](experimental-features.md)
* [Screenshot (Export as Image)](plugin-screenshot.md)
* [Contribution](4.contribution.md)
* [Development Guide *](5.development.md)

Expand Down Expand Up @@ -79,7 +80,7 @@ it is strongly recommended to test all the use cases on the page, no matter you
It should be noted: If the ES6 files is changed, you may have to run `npm run build` and refresh the page to preview the changes.


copyright notice
copyright
===

Reproduction and deduction are prohibited.
Expand Down
60 changes: 12 additions & 48 deletions docs/en/experimental-features.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,27 @@
[Table of Contents](index.md)

* [1. Usage](1.usage.md)
* [2. Options](2.options.md)
* [3. Operation](3.operation.md)
* [Usage](1.usage.md)
* [Options](2.options.md)
* [Operation](3.operation.md)
* [Experimental Features *](experimental-features.md)
* [Screenshot (Export as Image)](plugin-screenshot.md)
* [Contribution](4.contribution.md)
* [Development Guide](5.development.md)

> Special note: These experimental features are not guaranteed to continue to exist in subsequent versions, nor are their API compatibility guaranteed. If experimental features are used in your project, please upgrade jsmind with caution in the future.
Export Image/Screenshot
Experimental Features
===
This feature can support to export mind maps as png images.

```html

<!-- style -->
<link type="text/css" rel="stylesheet" href="https://unpkg.com/jsmind@0.7.4/style/jsmind.css" />

<!-- jsMind -->
<script type="text/javascript" src="https://unpkg.com/jsmind@0.7.4/es6/jsmind.js"></script>

<!-- dependency of screenshot -->
<script type="text/javascript" src="https://unpkg.com/dom-to-image@2.6.0/dist/dom-to-image.min.js" ></script>
Some contents in the documents are annotated with `experimental`, indicating that those features are currently in experimental stage, which means those features may be changed in the future. The experimental features are neither guaranteed to continue to exist in subsequent versions, nor guaranteed their backward compatibility. If any experimental feature is used in your project, you'd better test them carefully when you upgrade jsmind in the future.

<!-- screenshot plugin -->
<script type="text/javascript" src="https://unpkg.com/jsmind@0.7.4/es6/jsmind.screenshot.js"></script>

List of Experimental Features:

<script>
var jm = new jsMind(options);
jm.show(mind_data);
// export current mindmap to an image
jm.shoot()
</script>
- [Screenshot (Export as Image)](plugin-screenshot.md)

```

If you use npm, please install `jsmind` and `dom-to-image`

```bash
npm install jsmind
npm install dom-to-image
```

And then use it the same way on the page.

```html
<script>
import domtoimage from 'dom-to-image';
import jsMind from 'jsmind'
import 'jsmind/screenshot'
import 'jsmind/style/jsmind.css'
copyright notice
===

// ...
Reproduction and deduction are prohibited.

var jm = new jsMind(options);
jm.show(mind_data);
// export current mindmap to an image
jm.shoot()
</script>
```
The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.
37 changes: 19 additions & 18 deletions docs/en/index.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
Table of Contents
======

* [1. Usage](1.usage.md)
* 1.1 Basic Framework
* 1.2 Data Format
* 1.3 Themes
* 1.4 Styles
* [2. Options](2.options.md)
* 2.1 Introduction
* 2.2 Conventional Options
* 2.3 Layout Options
* 2.4 Shortcuts
* [3. API / Operation](3.operation.md)
* 3.1 Displaying a Mindmap
* 3.2 Finding Nodes
* 3.3 Operation on Nodes
* 3.4 Editing Nodes
* 3.5 Setting Style
* 3.6 Access to Data
* 3.7 Other Operations
* [Usage](1.usage.md)
* Basic Framework
* Data Format
* Themes
* Styles
* [Options](2.options.md)
* Introduction
* Conventional Options
* Layout Options
* Shortcuts
* [API / Operation](3.operation.md)
* Rendering a Mindmap
* Finding Nodes
* Operation on Nodes
* Editing Nodes
* Setting Style
* Access to Data
* Other Operations
* [Experimental Features](experimental-features.md)
* [Screenshot (Export as Image)](plugin-screenshot.md)
* [Contribution](4.contribution.md)
* [Development Guide](5.development.md)

Expand Down
72 changes: 72 additions & 0 deletions docs/en/plugin-screenshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[Table of Contents](index.md)

* [Usage](1.usage.md)
* [Options](2.options.md)
* [Operation](3.operation.md)
* [Experimental Features](experimental-features.md)
* [Screenshot (Export as Image) *](plugin-screenshot.md)
* [Contribution](4.contribution.md)
* [Development Guide](5.development.md)

Screenshot (Export as Image) <sup>[experimental](experimental-features.md)</sup>
===

> It's strongly recommended that you read [Experimental Features](experimental-features.md) to fully understand the risks before using this feature.
This feature can support to export mind maps as png images.

```html

<!-- style -->
<link type="text/css" rel="stylesheet" href="https://unpkg.com/jsmind@0.7.4/style/jsmind.css" />

<!-- jsMind -->
<script type="text/javascript" src="https://unpkg.com/jsmind@0.7.4/es6/jsmind.js"></script>

<!-- dependency of screenshot -->
<script type="text/javascript" src="https://unpkg.com/dom-to-image@2.6.0/dist/dom-to-image.min.js" ></script>

<!-- screenshot plugin -->
<script type="text/javascript" src="https://unpkg.com/jsmind@0.7.4/es6/jsmind.screenshot.js"></script>


<script>
var jm = new jsMind(options);
jm.show(mind_data);
// export current mindmap to an image
jm.shoot()
</script>

```

If you use npm, please install `jsmind` and `dom-to-image`

```bash
npm install jsmind
npm install dom-to-image
```

And then use it the same way on the page.

```html
<script>
import domtoimage from 'dom-to-image';
import jsMind from 'jsmind'
import 'jsmind/screenshot'
import 'jsmind/style/jsmind.css'
// ...
var jm = new jsMind(options);
jm.show(mind_data);
// export current mindmap to an image
jm.shoot()
</script>
```

copyright notice
===

Reproduction and deduction are prohibited.

The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
## 中文

* [目录](zh/index.md)
* [1. 基本用法](zh/1.usage.md)
* [2. 选项](zh/2.options.md)
* [3. 界面操控](zh/3.operation.md)
* [基本用法](zh/1.usage.md)
* [选项](zh/2.options.md)
* [界面操控](zh/3.operation.md)
* [实验性功能](zh/experimental-features.md)
* [参与贡献](zh/4.contribution.md)
* [贡献代码指南](zh/5.development.md)

## English

* [Table of Contents](en/index.md)
* [1. Usage](en/1.usage.md)
* [2. Options](en/2.options.md)
* [3. API / Operation](en/3.operation.md)
* [Usage](en/1.usage.md)
* [Options](en/2.options.md)
* [API / Operation](en/3.operation.md)
* [Experimental Features](en/experimental-features.md)
* [Contribution](en/4.contribution.md)
* [Development Guide](en/5.development.md)
11 changes: 6 additions & 5 deletions docs/zh/1.usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[目录](index.md)

* [1. 基本用法 *](1.usage.md)
* [2. 选项](2.options.md)
* [3. 界面操控](3.operation.md)
* [基本用法 *](1.usage.md)
* [选项](2.options.md)
* [界面操控](3.operation.md)
* [实验性功能](experimental-features.md)
* [截图 (导出图片)](plugin-screenshot.md)
* [参与贡献](4.contribution.md)
* [贡献代码指南](5.development.md)

Expand All @@ -23,8 +24,8 @@
> - https://unpkg.com/jsmind@0.7.4/es6/jsmind.js
> - https://cdn.jsdelivr.net/npm/jsmind@0.7.4/es6/jsmind.js
> - https://jsd.onmicrosoft.cn/npm/jsmind@0.7.4/es6/jsmind.js
> 版本:上面的示例url中都有版本号,强烈建议你在项目里也指明版本号,以避免版本升级给你的项目带来风险。访问 [NPM 上的 jsMind](https://www.npmjs.com/package/jsmind) 可以获取 jsmind 的最新版本号。
>
> 示例中url中都有版本号,强烈建议你在项目里也指明版本号,以避免版本升级给你的项目带来风险。访问 [NPM 上的 jsMind](https://www.npmjs.com/package/jsmind) 可以获取 jsmind 的最新版本号。
如果希望能够通过鼠标拖拽的方式移动节点,需要额外引用 jsmind.draggable-node.js 文件

Expand Down
7 changes: 4 additions & 3 deletions docs/zh/2.options.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[目录](index.md)

* [1. 基本用法](1.usage.md)
* [2. 选项 *](2.options.md)
* [3. 界面操控](3.operation.md)
* [基本用法](1.usage.md)
* [选项 *](2.options.md)
* [界面操控](3.operation.md)
* [实验性功能](experimental-features.md)
* [截图 (导出图片)](plugin-screenshot.md)
* [参与贡献](4.contribution.md)
* [贡献代码指南](5.development.md)

Expand Down
7 changes: 4 additions & 3 deletions docs/zh/3.operation.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[目录](index.md)

* [1. 基本用法](1.usage.md)
* [2. 选项](2.options.md)
* [3. 界面操控 *](3.operation.md)
* [基本用法](1.usage.md)
* [选项](2.options.md)
* [界面操控 *](3.operation.md)
* [实验性功能](experimental-features.md)
* [截图 (导出图片)](plugin-screenshot.md)
* [参与贡献](4.contribution.md)
* [贡献代码指南](5.development.md)

Expand Down
7 changes: 4 additions & 3 deletions docs/zh/4.contribution.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[目录](index.md)

* [1. 基本用法](1.usage.md)
* [2. 选项](2.options.md)
* [3. 界面操控](3.operation.md)
* [基本用法](1.usage.md)
* [选项](2.options.md)
* [界面操控](3.operation.md)
* [实验性功能](experimental-features.md)
* [截图 (导出图片)](plugin-screenshot.md)
* [参与贡献 *](4.contribution.md)
* [贡献代码指南](5.development.md)

Expand Down
7 changes: 4 additions & 3 deletions docs/zh/5.development.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[目录](index.md)

* [1. 基本用法](1.usage.md)
* [2. 选项](2.options.md)
* [3. 界面操控](3.operation.md)
* [基本用法](1.usage.md)
* [选项](2.options.md)
* [界面操控](3.operation.md)
* [实验性功能](experimental-features.md)
* [截图 (导出图片)](plugin-screenshot.md)
* [参与贡献](4.contribution.md)
* [贡献代码指南 *](5.development.md)

Expand Down
Loading

0 comments on commit 0ba01d5

Please sign in to comment.