mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🎨 export img
This commit is contained in:
parent
7092170a6d
commit
7237dcd43b
1 changed files with 4 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ import {isMobile} from "../../util/functions";
|
|||
import {Constants} from "../../constants";
|
||||
import {highlightRender} from "../markdown/highlightRender";
|
||||
import {processRender} from "../util/processCode";
|
||||
import {openByMobile} from "../util/compatibility";
|
||||
|
||||
declare const html2canvas: (element: Element) => Promise<any>;
|
||||
export const afterExport = (exportPath: string, msgId: string) => {
|
||||
|
|
@ -70,7 +71,9 @@ export const exportImage = (id: string) => {
|
|||
const formData = new FormData();
|
||||
formData.append("file", blob, response.data.name + ".png");
|
||||
formData.append("type", "image/png");
|
||||
fetchPost("/api/export/exportAsFile", formData);
|
||||
fetchPost("/api/export/exportAsFile", formData, (response) => {
|
||||
openByMobile(response.data.file);
|
||||
});
|
||||
hideMessage(msgId);
|
||||
exportDialog.destroy();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue