Skip to content

Commit

Permalink
fix: 修复默认为editOnly时status错误的问题 (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyebrowkang authored Sep 21, 2023
1 parent cce4b1d commit 8af042a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Cherry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
});
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 8af042a

Please sign in to comment.