mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 08:01:59 +08:00
This commit is contained in:
parent
834a736293
commit
72a2138ba1
@ -1101,12 +1101,12 @@ export class Toolbar {
|
|||||||
const exportImg = () => {
|
const exportImg = () => {
|
||||||
const msgId = showMessage(window.siyuan.languages.exporting, 0);
|
const msgId = showMessage(window.siyuan.languages.exporting, 0);
|
||||||
if (renderElement.getAttribute("data-subtype") === "plantuml") {
|
if (renderElement.getAttribute("data-subtype") === "plantuml") {
|
||||||
fetch(renderElement.querySelector("img").getAttribute("src")).then(function (response) {
|
fetch(renderElement.querySelector("object").getAttribute("data")).then(function (response) {
|
||||||
return response.blob();
|
return response.blob();
|
||||||
}).then(function (blob) {
|
}).then(function (blob) {
|
||||||
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/svg+xml");
|
||||||
fetchPost("/api/export/exportAsFile", formData, (response) => {
|
fetchPost("/api/export/exportAsFile", formData, (response) => {
|
||||||
openByMobile(response.data.file);
|
openByMobile(response.data.file);
|
||||||
hideMessage(msgId);
|
hideMessage(msgId);
|
||||||
|
Loading…
Reference in New Issue
Block a user