mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 19:09:49 +08:00
This commit is contained in:
parent
21b86f5592
commit
36c923e650
@ -946,7 +946,7 @@ export class Toolbar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public showRender(protyle: IProtyle, renderElement: HTMLElement, updateElements?: Element[], oldHTML?: string) {
|
public showRender(protyle: IProtyle, renderElement: Element, updateElements?: Element[], oldHTML?: string) {
|
||||||
const nodeElement = hasClosestBlock(renderElement);
|
const nodeElement = hasClosestBlock(renderElement);
|
||||||
if (!nodeElement) {
|
if (!nodeElement) {
|
||||||
return;
|
return;
|
||||||
@ -1116,9 +1116,9 @@ export class Toolbar {
|
|||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
addScript("/stage/protyle/js/html-to-image.min.js?v=1.11.13", "protyleHtml2image").then(() => {
|
addScript("/stage/protyle/js/html-to-image.min.js?v=1.11.13", "protyleHtml2image").then(() => {
|
||||||
renderElement.style.display = "inline-block";
|
(renderElement as HTMLHtmlElement).style.display = "inline-block";
|
||||||
window.htmlToImage.toBlob(renderElement).then(blob => {
|
window.htmlToImage.toBlob(renderElement).then(blob => {
|
||||||
renderElement.style.display = "";
|
(renderElement as HTMLHtmlElement).style.display = "";
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", blob);
|
formData.append("file", blob);
|
||||||
formData.append("type", "image/png");
|
formData.append("type", "image/png");
|
||||||
|
Loading…
Reference in New Issue
Block a user