ueditor.html 1.44 KB
<!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>