调整vditor编辑器插入模板方式和大纲显示

This commit is contained in:
yangjian 2021-02-28 20:55:13 +08:00
parent c2e46385e1
commit 4eb2dcfd98
3 changed files with 9 additions and 2 deletions

View File

@ -348,7 +348,7 @@
if(editor_mode == 1){
editor.insertValue(r.data);
}else if(editor_mode == 2){
editor.setValue(r.data);
editor.insertValue(r.data);
}
layer.closeAll()
}else{

View File

@ -343,7 +343,11 @@
layer.load();
$.post("{% url 'get_doctemp' %}",{'doctemp_id':doctemp_id},function(r){
if(r.status){
editor.insertValue(r.data);
if(editor_mode == 1){
editor.insertValue(r.data);
}else if(editor_mode == 2){
editor.insertValue(r.data);
}
layer.closeAll()
}else{
layer.closeAll("loading");

View File

@ -197,6 +197,9 @@
"width":'100%',
"mode":vditor_mode, // 编辑器模式
"placeholder":"道友,开始吧……",
"outline":{
enable:true,
},
"counter":{
enable:true, // 启用计数
},