Skip to content

Commit 2c8d975

Browse files
authored
🎨 Improve the style of exported PDF (#15463)
1 parent 4855b52 commit 2c8d975

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/src/protyle/export/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const getSnippetCSS = () => {
8585
let snippetCSS = "";
8686
document.querySelectorAll("style").forEach((item) => {
8787
if (item.id.startsWith("snippet")) {
88-
snippetCSS += item.innerHTML;
88+
snippetCSS += item.outerHTML;
8989
}
9090
});
9191
return snippetCSS;
@@ -182,8 +182,8 @@ const renderPDF = async (id: string) => {
182182
}
183183
${await setInlineStyle(false)}
184184
${await getPluginStyle()}
185-
${getSnippetCSS()}
186185
</style>
186+
${getSnippetCSS()}
187187
</head>
188188
<body style="-webkit-print-color-adjust: exact;">
189189
<div id="action">
@@ -676,8 +676,8 @@ const onExport = async (data: IWebSocketData, filePath: string, exportOption: IE
676676
body {font-family: var(--b3-font-family);background-color: var(--b3-theme-background);color: var(--b3-theme-on-background)}
677677
${await setInlineStyle(false)}
678678
${await getPluginStyle()}
679-
${getSnippetCSS()}
680679
</style>
680+
${getSnippetCSS()}
681681
</head>
682682
<body>
683683
<div class="${["htmlmd", "word"].includes(exportOption.type) ? "b3-typography" : "protyle-wysiwyg" + (window.siyuan.config.editor.displayBookmarkIcon ? " protyle-wysiwyg--attr" : "")}"

0 commit comments

Comments
 (0)