From 8f59465ca65c3bdb25cf5620d883829baf09e3aa Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 9 Dec 2024 09:18:09 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13391 --- app/src/protyle/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index 19dd3653c85..54d8a05463b 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -28,7 +28,7 @@ import {setPanelFocus} from "../layout/util"; /// #endif import {Title} from "./header/Title"; import {Background} from "./header/Background"; -import {onGet, setReadonlyByConfig} from "./util/onGet"; +import {disabledProtyle, enableProtyle, onGet, setReadonlyByConfig} from "./util/onGet"; import {reloadProtyle} from "./util/reload"; import {renderBacklink} from "./wysiwyg/renderBacklink"; import {setEmpty} from "../mobile/util/setEmpty"; @@ -455,4 +455,12 @@ export class Protyle { public focusBlock(element: Element, toStart = true) { return focusBlock(element, undefined, toStart); } + + public disable() { + disabledProtyle(this.protyle); + } + + public enable() { + enableProtyle(this.protyle); + } }