diff --git a/app/src/assets/scss/export.scss b/app/src/assets/scss/export.scss index 72d96f6d6..07c0c98c1 100644 --- a/app/src/assets/scss/export.scss +++ b/app/src/assets/scss/export.scss @@ -11,10 +11,6 @@ @import "component/slider"; @import "component/text-field"; -.protyle-wysiwyg { - font-family: var(--b3-font-family); -} - .protyle-wysiwyg a, .b3-typography a { color: var(--b3-protyle-inline-link-color); diff --git a/app/src/assets/scss/protyle/_content.scss b/app/src/assets/scss/protyle/_content.scss index aa0ba9966..570a6b551 100644 --- a/app/src/assets/scss/protyle/_content.scss +++ b/app/src/assets/scss/protyle/_content.scss @@ -1,5 +1,4 @@ .protyle { - font-family: var(--b3-font-family); overflow-x: hidden; background-color: var(--b3-theme-background); position: relative; diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 9f36405e0..2d78e09a0 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -68,6 +68,16 @@ export const saveExport = (option: IExportOptions) => { /// #endif }; +const getSnippetCSS = () => { + let snippetCSS = ""; + document.querySelectorAll("style").forEach((item) => { + if (item.id.startsWith("snippet")) { + snippetCSS += item.innerHTML; + } + }); + return snippetCSS; +}; + /// #if !BROWSER const renderPDF = (id: string) => { const localData = window.siyuan.storage[Constants.LOCAL_EXPORTPDF]; @@ -78,12 +88,6 @@ const renderPDF = (id: string) => { themeStyle = ``; } // data-theme-mode="light" https://github.com/siyuan-note/siyuan/issues/7379 - let snippetCSS = ""; - document.querySelectorAll("style").forEach((item) => { - if (item.id.startsWith("snippet")) { - snippetCSS += item.innerHTML; - } - }); const html = `
@@ -101,6 +105,7 @@ const renderPDF = (id: string) => { - @@ -617,8 +620,10 @@ const onExport = (data: IWebSocketData, filePath: string, exportOption: IExportO ${themeStyle}