mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
bdf7d172da
commit
a74e5de394
2 changed files with 5 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ import {getSearch, isMobile, isValidAttrName} from "../util/functions";
|
|||
import {isLocalPath, movePathTo, moveToPath, pathPosix} from "../util/pathName";
|
||||
import {MenuItem} from "./Menu";
|
||||
import {onExport, saveExport} from "../protyle/export";
|
||||
import {isInAndroid, isInHarmony, openByMobile, writeText} from "../protyle/util/compatibility";
|
||||
import {isInAndroid, isInHarmony, isInIOS, openByMobile, writeText} from "../protyle/util/compatibility";
|
||||
import {fetchPost, fetchSyncPost} from "../util/fetch";
|
||||
import {hideMessage, showMessage} from "../dialog/message";
|
||||
import {Dialog} from "../dialog";
|
||||
|
|
@ -758,7 +758,7 @@ export const exportMd = (id: string) => {
|
|||
id: "exportPDF",
|
||||
label: window.siyuan.languages.print,
|
||||
icon: "iconPDF",
|
||||
ignore: !isInAndroid() && !isInHarmony(),
|
||||
ignore: !isInAndroid() && !isInHarmony() && !isInIOS(),
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting);
|
||||
const localData = window.siyuan.storage[Constants.LOCAL_EXPORTPDF];
|
||||
|
|
@ -773,6 +773,8 @@ export const exportMd = (id: string) => {
|
|||
window.JSAndroid.print(html);
|
||||
} else if (isInHarmony()) {
|
||||
window.JSHarmony.print(html);
|
||||
} else if (isInIOS()) {
|
||||
window.webkit.messageHandlers.print.postMessage(html);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -228,6 +228,7 @@ interface Window {
|
|||
changeStatusBar: { postMessage: (url: string) => void }
|
||||
setClipboard: { postMessage: (url: string) => void }
|
||||
purchase: { postMessage: (url: string) => void }
|
||||
print: { postMessage: (html: string) => void }
|
||||
}
|
||||
};
|
||||
htmlToImage: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue