ui: 支持设置编辑器模式偏好

This commit is contained in:
undefined committed 2021-04-18 20:58:29 +08:00
1 parent a7dc00361c
commit bee8537a91
4 files changed
+11 -3

No files matched your search

@@ -9,7 +9,7 @@ export const config = {
'upload', 'record', '|',
'edit-mode', 'content-theme', 'code-theme', 'export', 'preview',
],
mode: 'ir',
mode: UserContext.preferedEditorType || 'ir',
toolbarConfig: {
pin: true,
},
@@ -11,7 +11,7 @@ export default class TextareaHandler extends DOMAttachedObject {
isCmEditor() {
const editor = this.getCmEditor();
return (editor !== undefined && editor.isValid());
return (editor && editor.isValid);
}
val(...argv) {