mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
feat(client/print): automatically apply right query param
This commit is contained in:
parent
55fde593a3
commit
750c4104f7
@ -51,7 +51,12 @@ export default function PresentationView({ note, noteIds, media }: ViewModeProps
|
|||||||
<ButtonOverlay containerRef={containerRef} api={api} />
|
<ButtonOverlay containerRef={containerRef} api={api} />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
} else {
|
} else if (media === "print") {
|
||||||
|
// Printing needs a query parameter that is read by Reveal.js.
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
url.searchParams.set("print-pdf", "");
|
||||||
|
window.history.replaceState({}, '', url);
|
||||||
|
|
||||||
// Shadow DOM doesn't work well with Reveal.js's PDF printing mechanism.
|
// Shadow DOM doesn't work well with Reveal.js's PDF printing mechanism.
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user