From 5e6efbce4f4b3374e78ae72723aaabc5be18f004 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 11 Oct 2022 23:41:27 +0800 Subject: [PATCH] :sparkles: fix https://github.com/siyuan-note/siyuan/issues/2648 --- app/src/config/editor.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/config/editor.ts b/app/src/config/editor.ts index 250fdc3f9..8f6361945 100644 --- a/app/src/config/editor.ts +++ b/app/src/config/editor.ts @@ -24,7 +24,8 @@ export const editor = { fetchPost("/api/setting/setEditor", window.siyuan.config.editor, () => { const allModels = getAllModels() allModels.editor.forEach(editor => { - if (readOnly) { disabledProtyle(editor.editor.protyle); + if (readOnly) { + disabledProtyle(editor.editor.protyle); } else { enableProtyle(editor.editor.protyle); } @@ -38,6 +39,13 @@ export const editor = { } }) }); + allModels.search.forEach(search => { + if (readOnly) { + disabledProtyle(search.protyle.protyle); + } else { + enableProtyle(search.protyle.protyle); + } + }); window.siyuan.blockPanels.forEach(item => { item.editors.forEach(editor => { if (readOnly) {