From 3be30c0f2806e4548da01a3a7f2dd52049f4776d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 30 Dec 2022 20:43:52 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF=E5=92=8C?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E7=AB=AF=E6=94=AF=E6=8C=81=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=8B=BC=E5=86=99=E6=A3=80=E6=9F=A5=20https://github.?= =?UTF-8?q?com/siyuan-note/siyuan/issues/597?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/markdown/setLute.ts | 1 + app/src/protyle/util/reload.ts | 1 + app/src/types/protyle.d.ts | 2 ++ 3 files changed, 4 insertions(+) diff --git a/app/src/protyle/markdown/setLute.ts b/app/src/protyle/markdown/setLute.ts index d4a7a99dd..81ac7ef9b 100644 --- a/app/src/protyle/markdown/setLute.ts +++ b/app/src/protyle/markdown/setLute.ts @@ -1,5 +1,6 @@ export const setLute = (options: ILuteOptions) => { const lute: Lute = Lute.New(); + lute.SetSpellcheck(window.siyuan.config.editor.spellcheck); lute.SetProtyleMarkNetImg(window.siyuan.config.editor.displayNetImgMark); lute.SetFileAnnotationRef(true); lute.SetTextMark(true); diff --git a/app/src/protyle/util/reload.ts b/app/src/protyle/util/reload.ts index 06fafe612..b93d6713f 100644 --- a/app/src/protyle/util/reload.ts +++ b/app/src/protyle/util/reload.ts @@ -21,6 +21,7 @@ export const reloadProtyle = (protyle: IProtyle) => { } } protyle.lute.SetProtyleMarkNetImg(window.siyuan.config.editor.displayNetImgMark); + protyle.lute.SetSpellcheck(window.siyuan.config.editor.spellcheck); addLoading(protyle); if (protyle.options.backlinkData) { const isMention = protyle.element.getAttribute("data-ismention") === "true"; diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.ts index 8f8dff83c..348c6f5b4 100644 --- a/app/src/types/protyle.d.ts +++ b/app/src/types/protyle.d.ts @@ -153,6 +153,8 @@ declare class Lute { public SetProtyleMarkNetImg(enable: boolean): void; + public SetSpellcheck(enable: boolean): void; + public SetFileAnnotationRef(enable: boolean): void; public SetSetext(enable: boolean): void;