Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/8225

Vanessaf96462703861
diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts
index 56dc28daa3..40aa471af6 100644
--- a/app/src/protyle/export/util.ts
+++ b/app/src/protyle/export/util.ts
@@ -56,7 +56,7 @@ export const exportImage = (id: string) => {
setStorageVal(Constants.LOCAL_EXPORTIMG, window.siyuan.storage[Constants.LOCAL_EXPORTIMG]);
setTimeout(() => {
addScript("stage/protyle/js/html2canvas.min.js?v=1.4.1", "protyleHtml2canvas").then(() => {
- window.html2canvas(previewElement.parentElement).then((canvas) => {
+ window.html2canvas(previewElement.parentElement, {useCORS: true}).then((canvas) => {
canvas.toBlob((blob: Blob) => {
const formData = new FormData();
formData.append("file", blob, btnsElement[1].getAttribute("data-title"));
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 2a7f30ad1a..64df8cfd21 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -39,7 +39,7 @@ interface Window {
dataLayer: any[]
siyuan: ISiyuan
webkit: any
- html2canvas: (element: Element) => Promise<any>;
+ html2canvas: (element: Element, opitons: {useCORS: boolean}) => Promise<any>;
JSAndroid: {
returnDesktop(): void
openExternal(url: string): void