-
-
Notifications
You must be signed in to change notification settings - Fork 898
Expand file tree
/
Copy path3_requirejs.html
More file actions
59 lines (57 loc) · 1.8 KB
/
3_requirejs.html
File metadata and controls
59 lines (57 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jsMind</title>
<link
type="text/css"
rel="stylesheet"
href="https://unpkg.com/jsmind@0.9.1/style/jsmind.css"
/>
<style type="text/css">
#jsmind_container {
width: 900px;
height: 600px;
border: solid 1px #ccc;
background: #f4f4f4;
}
</style>
</head>
<body>
<p>查看页面源文件了解具体写法</p>
<p>See the page source for details</p>
<div id="jsmind_container"></div>
</body>
<script src="https://requirejs.org/docs/release/2.3.6/minified/require.js"></script>
<script type="text/javascript">
require.config({
paths: {
'jsmind': 'https://unpkg.com/jsmind@0.9.1/es6/jsmind',
'jsmind/draggable-node': 'https://unpkg.com/jsmind@0.9.1/es6/jsmind.draggable-node',
},
});
require(['jsmind', 'jsmind/draggable-node'], function (jsMind, _) {
let mind = {
meta: {
name: 'jsMind example',
author: 'hizzgdev@163.com',
version: '0.9.1',
},
format: 'node_tree',
data: {
id: 'root',
topic: 'jsMind',
children: [],
},
};
let options = {
container: 'jsmind_container',
editable: true,
theme: 'primary',
};
let jm = new jsMind(options);
jm.show(mind);
});
</script>
</html>