Skip to content

Commit 44b87de

Browse files
committed
🐛 #17967
Signed-off-by: Daniel <845765@qq.com>
1 parent 7717336 commit 44b87de

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/src/protyle/export/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const exportImage = (id: string) => {
9090
item.textContent = (index + 1).toString();
9191
});
9292
setTimeout(() => {
93-
addScript("${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13", "protyleHtml2image").then(async () => {
93+
addScript(`${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13`, "protyleHtml2image").then(async () => {
9494
let blob = await window.htmlToImage.toBlob(exportDialog.element.querySelector(".b3-dialog__content"));
9595
if (isIPhone() || isSafari()) {
9696
await window.htmlToImage.toBlob(contentElement);
@@ -138,7 +138,7 @@ export const exportImage = (id: string) => {
138138
if (window.siyuan.config.export.imageWatermarkStr.startsWith("http")) {
139139
watermarkPreviewElement.setAttribute("style", `background-image: url(${window.siyuan.config.export.imageWatermarkStr});background-repeat: repeat;position: absolute;top: 0;left: 0;width: 100%;height: 100%;border-radius: var(--b3-border-radius-b);`);
140140
} else {
141-
addScript("${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13", "protyleHtml2image").then(() => {
141+
addScript(`${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13`, "protyleHtml2image").then(() => {
142142
const width = Math.max(exportDialog.element.querySelector(".export-img").clientWidth / 3, 150);
143143
watermarkPreviewElement.setAttribute("style", `width: ${width}px;height: ${width}px;display: flex;justify-content: center;align-items: center;color: var(--b3-border-color);font-size: 14px;`);
144144
watermarkPreviewElement.innerHTML = `<div style="transform: rotate(-45deg)">${window.siyuan.config.export.imageWatermarkStr}</div>`;

app/src/protyle/toolbar/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ export class Toolbar {
10611061
return;
10621062
}
10631063
setTimeout(() => {
1064-
addScript("${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13", "protyleHtml2image").then(() => {
1064+
addScript(`${Constants.PROTYLE_CDN}/js/html-to-image.min.js?v=1.11.13`, "protyleHtml2image").then(() => {
10651065
(renderElement as HTMLHtmlElement).style.display = "inline-block";
10661066
window.htmlToImage.toBlob(renderElement).then(blob => {
10671067
(renderElement as HTMLHtmlElement).style.display = "";

0 commit comments

Comments
 (0)