mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
09e52d3c54
commit
3356f5b69b
1 changed files with 2 additions and 11 deletions
|
|
@ -3,7 +3,7 @@ import {escapeHtml} from "../../util/escape";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
/// #endif
|
/// #endif
|
||||||
import {hideMessage, showMessage} from "../../dialog/message";
|
import {hideMessage, showMessage} from "../../dialog/message";
|
||||||
import {fetchGet, fetchPost} from "../../util/fetch";
|
import {fetchPost} from "../../util/fetch";
|
||||||
import {Dialog} from "../../dialog";
|
import {Dialog} from "../../dialog";
|
||||||
import {addScript} from "../util/addScript";
|
import {addScript} from "../util/addScript";
|
||||||
import {isMobile} from "../../util/functions";
|
import {isMobile} from "../../util/functions";
|
||||||
|
|
@ -156,16 +156,7 @@ export const exportImage = (id: string) => {
|
||||||
item.parentElement.style.overflow = "hidden";
|
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();
|
updateWatermark();
|
||||||
btnsElement[0].removeAttribute("disabled");
|
btnsElement[0].removeAttribute("disabled");
|
||||||
btnsElement[1].removeAttribute("disabled");
|
btnsElement[1].removeAttribute("disabled");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue