From 37b900d889a4a97a6cd4d499fe3fb63582d738ac Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 17 Sep 2022 11:42:01 +0800 Subject: [PATCH] :art: pdf --- app/src/protyle/export/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index aa40584d5..52d2083cd 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -240,7 +240,7 @@ const renderPDF = (id: string) => { right: 232px; left: 0; } - body.exporting::-webkit-scrollbar { + .exporting::-webkit-scrollbar { width: 0; height: 0; } @@ -250,6 +250,8 @@ const renderPDF = (id: string) => { white-space: pre-wrap !important; } .protyle-wysiwyg { + height: 100%; + overflow: auto; box-sizing: border-box; padding: 34px ${pdfMargin}in 16px; width: ${pdfWidth}in @@ -394,7 +396,7 @@ const renderPDF = (id: string) => { rootTitle: "{tpl.name}" }) actionElement.remove(); - document.querySelector("body").classList.add("exporting"); + previewElement.classList.add("exporting"); }); `; win.loadURL("data:text/html;charset=UTF-8," + encodeURIComponent(`