ueditor.html
1.44 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- 加载编辑器的容器 -->
<script id="container" name="content" type="text/plain">
</script>
<!-- 配置文件 -->
<script src="../include.js"></script>
<script type="text/javascript" src="../jquery/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="../ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="./third-party/zeroclipboard/ZeroClipboard.min.js"></script>
<script type="text/javascript" src="../ueditor/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="../ueditor/lang/zh-cn/zh-cn.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
var ue = UE.getEditor('container');
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
UE.Editor.prototype.getActionUrl = function(action) {
if (action == 'uploadimage' || action == 'uploadfile') {
return contextPath + '/fileupload/upload4UE';
} else {
return this._bkGetActionUrl.call(this, action);
}
};
//$(".edui-mask").off("click mousedown");
ue.ready(function() {
$(".edui-mask").removeAttr("onclick").removeAttr("onmousedown");
ue.execCommand('serverparam', function(editor) {
return {
'bucket': 'goodsimg' //设置富文本编辑器请求时,携带的额外参数
};
});
});
</script>
</body>
</html>