forked from kindsoft/kindeditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwidget.html
64 lines (64 loc) · 1.63 KB
/
widget.html
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
60
61
62
63
64
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>KindEditor Widget Test</title>
<link rel="stylesheet" href="../lib/qunit/qunit.css" />
<style>
textarea {
display: block;
width: 600px;
height: 200px;
}
iframe {
border: 1px solid #A0A0A0;
width : 1200px;
height : 1200px;
}
</style>
<!-- <script src="../lib/firebug-lite/build/firebug-lite.js#startOpened"></script> -->
<script src="../lib/qunit/qunit.js"></script>
<script src="../lib/jquery.min.js"></script>
<link rel="stylesheet" href="../themes/default/default.css" />
<script src="../src/core.js"></script>
<script src="../src/config.js"></script>
<script src="../src/event.js"></script>
<script src="../src/html.js"></script>
<script src="../src/selector.js"></script>
<script src="../src/node.js"></script>
<script src="../src/range.js"></script>
<script src="../src/cmd.js"></script>
<script src="../src/widget.js"></script>
</head>
<body>
<h1>KindEditor Widget Test</h1>
<input type="button" id="create" value="Create" />
<input type="button" id="remove" value="Remove" />
<br />
<br />
<iframe></iframe>
<script>
var widget = null;
K('#create').click(function() {
if (!widget) {
widget = K.widget({
z : 100,
width : 200,
height : 100,
html : '<strong>abc</strong>123<strong>abc</strong><strong>abc</strong>',
css : {
border : '1px solid #A0A0A0',
background : '#F0F0F0'
}
}).draggable();
}
});
K('#remove').click(function() {
if (widget) {
widget.remove();
widget = null;
}
});
</script>
</body>
</html>