Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/8598

Vanessae6f727b961e3
diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts
index a7a8ae596a..da228970a4 100644
--- a/app/src/protyle/index.ts
+++ b/app/src/protyle/index.ts
@@ -29,6 +29,7 @@ import {setEmpty} from "../mobile/util/setEmpty";
import {resize} from "./util/resize";
import {getDocByScroll} from "./scroll/saveScroll";
import {App} from "../index";
+import {insertHTML} from "./util/insertHTML";
export class Protyle {
@@ -355,4 +356,12 @@ export class Protyle {
public resize() {
resize(this.protyle);
}
+
+ public reload(focus: boolean) {
+ reloadProtyle(this.protyle, focus);
+ }
+
+ public insert(html: string, isBlock = false, useProtyleRange = false) {
+ insertHTML(html, this.protyle, isBlock, useProtyleRange);
+ }
}