mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 22:52:34 +01:00
This commit is contained in:
parent
1cfe63c64f
commit
7076dcd5c7
2 changed files with 16 additions and 6 deletions
|
|
@ -957,6 +957,20 @@ export class Toolbar {
|
|||
});
|
||||
const exportImg = () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, 0);
|
||||
if (renderElement.getAttribute("data-subtype") === "plantuml") {
|
||||
fetch(renderElement.querySelector("img").getAttribute("src")).then(function (response) {
|
||||
return response.blob()
|
||||
}).then(function (blob) {
|
||||
const formData = new FormData();
|
||||
formData.append("file", blob);
|
||||
formData.append("type", "image/png");
|
||||
fetchPost("/api/export/exportAsFile", formData, (response) => {
|
||||
openByMobile(response.data.file);
|
||||
hideMessage(msgId);
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
addScript("stage/protyle/js/html2canvas.min.js?v=1.4.1", "protyleHtml2canvas").then(() => {
|
||||
window.html2canvas(renderElement).then((canvas) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue