更换富文本编辑器为【wangEditor3】

This commit is contained in:
2018-03-01 14:03:17 +08:00
parent e2ef8c0162
commit 8d5ad54a20
7 changed files with 82 additions and 20 deletions

View File

@@ -13,13 +13,20 @@ layui.define(['fly','laypage'], function(exports){
var form = layui.form;
var laypage = layui.laypage;
var fly = layui.fly;
var editor;
var gather = {}, dom = {
jieda: $('#jieda')
,content: $('#L_content')
,jiedaCount: $('#jiedaCount')
};
var jie = {
createEditer : function(){
editor = fly.editer();
}
}
//监听专栏选择
form.on('select(column)', function(obj){
var value = obj.value
@@ -233,6 +240,7 @@ layui.define(['fly','laypage'], function(exports){
["contentId","title", "content", "type"].forEach(function (value) {
bean[value] = data.field[value];
});
bean["content"] = editor.txt.html();
console.log(bean);
fly.json("/os/content/save",{
@@ -249,6 +257,7 @@ layui.define(['fly','laypage'], function(exports){
["contentId","pid", "content"].forEach(function (value) {
bean[value] = data.field[value];
});
bean["content"] = editor.txt.html();
console.log(bean);
fly.json("/os/comment/save",{
@@ -305,5 +314,5 @@ layui.define(['fly','laypage'], function(exports){
});
}
exports('jie', null);
exports('jie', jie);
});