Skip to content

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

:art: Use the path ending with `/` when loading the widget https://github.com/siyuan-note/siyuan/issues/10520

Daniel667aa38d42bd
diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts
index 06ea1dd2e5..2a137d804e 100644
--- a/app/src/protyle/hint/extend.ts
+++ b/app/src/protyle/hint/extend.ts
@@ -447,7 +447,9 @@ export const hintRenderTemplate = (value: string, protyle: IProtyle, nodeElement
export const hintRenderWidget = (value: string, protyle: IProtyle) => {
focusByRange(protyle.toolbar.range);
- insertHTML(protyle.lute.SpinBlockDOM(`<iframe src="/widgets/${value}" data-subtype="widget" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`), protyle, true);
+ // src 地址以 / 结尾
+ // Use the path ending with `/` when loading the widget https://github.com/siyuan-note/siyuan/issues/10520
+ insertHTML(protyle.lute.SpinBlockDOM(`<iframe src="/widgets/${value}/" data-subtype="widget" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`), protyle, true);
hideElements(["util"], protyle);
};