From b22624b417b632316025c2a0df4eed8ce4063ba0 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 25 Feb 2024 22:16:41 +0800 Subject: [PATCH] :bug: Code appears when pasted as plain text Fix https://github.com/siyuan-note/siyuan/issues/10435 --- app/src/protyle/render/setLute.ts | 1 + app/src/types/protyle.d.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/src/protyle/render/setLute.ts b/app/src/protyle/render/setLute.ts index 09753c921..b1bd572d1 100644 --- a/app/src/protyle/render/setLute.ts +++ b/app/src/protyle/render/setLute.ts @@ -3,6 +3,7 @@ export const setLute = (options: ILuteOptions) => { lute.SetSpellcheck(window.siyuan.config.editor.spellcheck); lute.SetProtyleMarkNetImg(window.siyuan.config.editor.displayNetImgMark); lute.SetFileAnnotationRef(true); + lute.SetHTMLTag2TextMark(true); lute.SetTextMark(true); lute.SetHeadingID(false); lute.SetYamlFrontMatter(false); diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.ts index 5a7f5a078..89a736e9a 100644 --- a/app/src/types/protyle.d.ts +++ b/app/src/types/protyle.d.ts @@ -172,6 +172,8 @@ declare class Lute { public SetTextMark(enable: boolean): void; + public SetHTMLTag2TextMark(enable: boolean): void; + public SetHeadingID(enable: boolean): void; public SetProtyleMarkNetImg(enable: boolean): void;