Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/14161

Vanessa09e52d3c545f
diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts
index dcc728af68..b1e568d8d8 100644
--- a/app/src/protyle/export/util.ts
+++ b/app/src/protyle/export/util.ts
@@ -156,6 +156,16 @@ export const exportImage = (id: string) => {
item.parentElement.style.overflow = "hidden";
}
});
+ previewElement.querySelectorAll(".img img").forEach((item: HTMLImageElement) => {
+ const imgSrc = item.getAttribute("src");
+ if (imgSrc.endsWith(".svg")) {
+ fetchGet(item.src, (response: string) => {
+ item.src = `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(response)))}`;
+ });
+ } else if (imgSrc.startsWith("assets/")) {
+ item.src = location.origin + "/" + imgSrc;
+ }
+ });
updateWatermark();
btnsElement[0].removeAttribute("disabled");
btnsElement[1].removeAttribute("disabled");