标签:mode public char scp pos cti conf lan ||
1.导入scprit需要的插件
<script charset="utf-8" src="@{‘/public/assets/ueditor/ueditor.config.js‘}" type="text/javascript"></script>
<script charset="utf-8" src="@{‘/public/assets/ueditor/ueditor.all.js‘}" type="text/javascript"> </script>
<script charset="utf-8" src="@{‘/public/assets/ueditor/lang/zh-cn/zh-cn.js‘}" type="text/javascript"></script>
2.html代码
<div class="row">
<div class="col-md-12">
<script id="ueditor" type="text/plain" style="width: 100%; height: 250px;"></script>
</div>
</div>
3.script代码
var ueditor = UE.getEditor(‘editor‘); //获取控件
ueditor.addListener(‘ready‘, function (editor) { //监听 改变时调用
ueditor.setContent(data.models.model.content()||""); //自动赋值
});
//保存时执行操作
page.register("saving", function (postModel) {
postModel.model.content = ueditor.getContent(); //将ckeditor控件的值给model属性
if(!postModel.model.active) postModel.model.active = 0 //不知
});
标签:mode public char scp pos cti conf lan ||
原文地址:https://www.cnblogs.com/SHZX/p/9553146.html