//判断不为空
alert("不能为空!")
}
//得到值
var value=
UE.getEditor(
'id'
).getContent();
//赋值
$(function(){
UE.getEditor('id').addListener("ready", function () {
ue.setContent('服务器传过来的值');
});
});
页面
<div id="id" class="edui-default" style="width: 880px;"></div>
</center>
<!-- 加载编辑器的容器 -->
</script>
<!-- 配置文件 -->
<script type="text/javascript" src="plugins/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="plugins/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
var ue = UE.getEditor('id',{
autoHeight:true
});
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
//UE.Editor.prototype.getActionUrl = function(action) {
//if (action == 'UEditorUploadImage') {
//return 'http://localhost:8080/Spring-mvc/UEditorUploadImage';
//} else {
// return this._bkGetActionUrl.call(this, action);
//}
// }
</script>