mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Improve the style of exported PDF (#15463)
This commit is contained in:
parent
4855b522e3
commit
2c8d9757df
1 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ const getSnippetCSS = () => {
|
|||
let snippetCSS = "";
|
||||
document.querySelectorAll("style").forEach((item) => {
|
||||
if (item.id.startsWith("snippet")) {
|
||||
snippetCSS += item.innerHTML;
|
||||
snippetCSS += item.outerHTML;
|
||||
}
|
||||
});
|
||||
return snippetCSS;
|
||||
|
@ -182,8 +182,8 @@ const renderPDF = async (id: string) => {
|
|||
}
|
||||
${await setInlineStyle(false)}
|
||||
${await getPluginStyle()}
|
||||
${getSnippetCSS()}
|
||||
</style>
|
||||
${getSnippetCSS()}
|
||||
</head>
|
||||
<body style="-webkit-print-color-adjust: exact;">
|
||||
<div id="action">
|
||||
|
@ -676,8 +676,8 @@ const onExport = async (data: IWebSocketData, filePath: string, exportOption: IE
|
|||
body {font-family: var(--b3-font-family);background-color: var(--b3-theme-background);color: var(--b3-theme-on-background)}
|
||||
${await setInlineStyle(false)}
|
||||
${await getPluginStyle()}
|
||||
${getSnippetCSS()}
|
||||
</style>
|
||||
${getSnippetCSS()}
|
||||
</head>
|
||||
<body>
|
||||
<div class="${["htmlmd", "word"].includes(exportOption.type) ? "b3-typography" : "protyle-wysiwyg" + (window.siyuan.config.editor.displayBookmarkIcon ? " protyle-wysiwyg--attr" : "")}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue