-
Notifications
You must be signed in to change notification settings - Fork 2
/
old.html
52 lines (48 loc) · 1.44 KB
/
old.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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>NKeditor 在线编辑器 PHP demo</title>
<script charset="utf-8" src="NKeditor-all.js"></script>
<!-- 下面是外部插件不是必须引入的 -->
<script charset="utf-8" src="libs/jquery.min.js"></script>
<script charset="utf-8" src="libs/JDialog/JDialog.min.js"></script>
<script>
KindEditor.ready(function(K) {
K.create('textarea[name="content1"]', {
uploadJson : K.basePath+'php/qiniu/upload_json.php',
fileManagerJson : K.basePath+'php/qiniu/file_manager_json.php',
dialogOffset : 0, //对话框距离页面顶部的位置,默认为0居中,
allowFileManager : true,
allowImageUpload : true,
allowMediaUpload : true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=example]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=example]')[0].submit();
});
},
themeType : "default", //主题
//错误处理 handler
errorMsgHandler : function(message, type) {
try {
JDialog.msg({type:type, content:message, timer:2000});
} catch (Error) {
alert(message);
}
}
});
});
</script>
</head>
<body>
<form name="example" method="post" style="margin-top: 20px;">
<textarea name="content1" style="width:900px;height:500px;visibility:hidden;"></textarea>
</form>
</body>
</html>