mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
This commit is contained in:
parent
bda1ec9e03
commit
4aa2b6bdc9
2 changed files with 19 additions and 1 deletions
|
|
@ -752,7 +752,24 @@ export const exportMd = (id: string) => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
/// #else
|
||||||
|
{
|
||||||
|
id: "exportPDF",
|
||||||
|
label: "PDF",
|
||||||
|
icon: "iconPDF",
|
||||||
|
ignore: !isInAndroid(),
|
||||||
|
click: () => {
|
||||||
|
const localData = window.siyuan.storage[Constants.LOCAL_EXPORTPDF];
|
||||||
|
fetchPost("/api/export/exportPreviewHTML", {
|
||||||
|
id: "${id}",
|
||||||
|
keepFold: localData.keepFold,
|
||||||
|
merge: localData.mergeSubdocs,
|
||||||
|
}, response => {
|
||||||
|
window.JSAndroid.exportPDF(response.data.content);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
/// #endif
|
/// #endif
|
||||||
]
|
]
|
||||||
}).element;
|
}).element;
|
||||||
|
|
|
||||||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -245,6 +245,7 @@ interface Window {
|
||||||
readHTMLClipboard(): string
|
readHTMLClipboard(): string
|
||||||
getBlockURL(): string
|
getBlockURL(): string
|
||||||
hideKeyboard(): void
|
hideKeyboard(): void
|
||||||
|
exportPDF(html: string): void
|
||||||
};
|
};
|
||||||
JSHarmony: {
|
JSHarmony: {
|
||||||
openExternal(url: string): void
|
openExternal(url: string): void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue