From 4eb2dcfd988ccc88f0c1a312c6ea7c59fb66c51e Mon Sep 17 00:00:00 2001 From: yangjian Date: Sun, 28 Feb 2021 20:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4vditor=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E6=8F=92=E5=85=A5=E6=A8=A1=E6=9D=BF=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=E5=A4=A7=E7=BA=B2=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/app_doc/editor/create_doc.html | 2 +- template/app_doc/editor/modify_doc.html | 6 +++++- template/app_doc/editor/tpl_editor_vditor.html | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/template/app_doc/editor/create_doc.html b/template/app_doc/editor/create_doc.html index 96c5822..5ca6873 100644 --- a/template/app_doc/editor/create_doc.html +++ b/template/app_doc/editor/create_doc.html @@ -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{ diff --git a/template/app_doc/editor/modify_doc.html b/template/app_doc/editor/modify_doc.html index 85c32d4..ea91b5d 100644 --- a/template/app_doc/editor/modify_doc.html +++ b/template/app_doc/editor/modify_doc.html @@ -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"); diff --git a/template/app_doc/editor/tpl_editor_vditor.html b/template/app_doc/editor/tpl_editor_vditor.html index c76fbbd..95e516a 100644 --- a/template/app_doc/editor/tpl_editor_vditor.html +++ b/template/app_doc/editor/tpl_editor_vditor.html @@ -197,6 +197,9 @@ "width":'100%', "mode":vditor_mode, // 编辑器模式 "placeholder":"道友,开始吧……", + "outline":{ + enable:true, + }, "counter":{ enable:true, // 启用计数 },