From 64099d54b5f6f19eaf9de04434da2df0559d933a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 11 Nov 2025 11:19:49 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16245 --- app/src/protyle/export/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index a1f8ed181..481f4dca6 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -705,7 +705,11 @@ export const onExport = async (data: IWebSocketData, filePath: string, servePath themeStyle = ``; } const screenWidth = getScreenWidth(); - const minWidthHtml = isInAndroid() || isInHarmony() ? `document.body.style.minWidth = "${screenWidth}px"` : ""; + const mobileHtml = isInAndroid() || isInHarmony() ? { + js: `document.body.style.minWidth = "${screenWidth}px";`, + css: `@page { size: A4; } +.protyle-wysiwyg {padding : 0}` + } : {js: "", css: ""}; const html = ` @@ -725,17 +729,18 @@ export const onExport = async (data: IWebSocketData, filePath: string, servePath body {font-family: var(--b3-font-family);background-color: var(--b3-theme-background);color: var(--b3-theme-on-background)} ${await setInlineStyle(false, servePath)} ${await getPluginStyle()} + ${mobileHtml.css} ${getSnippetCSS()}
${data.data.content}
+style="max-width: 800px;margin: 0 auto;" id="preview">${data.data.content} ${getIconScript(servePath)}