From 8af042ae159ebd4ce025cdd6408ff9600f2d3d7c Mon Sep 17 00:00:00 2001 From: eyebrow <48169104+eyebrowkang@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:05:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=BAeditOnly=E6=97=B6status=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#608)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Cherry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cherry.js b/src/Cherry.js index 112c9db1..4de22b74 100644 --- a/src/Cherry.js +++ b/src/Cherry.js @@ -164,9 +164,6 @@ export default class Cherry extends CherryStatic { // default value init this.initText(editor.editor); - // 切换模式,有纯预览模式、纯编辑模式、双栏编辑模式 - this.switchModel(this.options.editor.defaultModel); - Event.on(this.instanceId, Event.Events.toolbarHide, () => { this.status.toolbar = 'hide'; }); @@ -187,6 +184,9 @@ export default class Cherry extends CherryStatic { Event.on(this.instanceId, Event.Events.editorOpen, () => { this.status.editor = 'show'; }); + + // 切换模式,有纯预览模式、纯编辑模式、双栏编辑模式 + this.switchModel(this.options.editor.defaultModel); } /**