🐛(frontend) remove comments from print

When we print a document, we want to hide
the comments and selection highlights. This is
done by adding some CSS rules to the print styles.
This commit is contained in:
Anthony LC
2026-05-19 22:04:44 +02:00
parent 48ba77b6d1
commit 0bfc697476
@@ -35,8 +35,10 @@ const PRINT_ONLY_CONTENT_CSS = `
}
/* Hide selection highlights */
.ProseMirror-yjs-selection {
.ProseMirror-yjs-selection,
.bn-thread-mark {
background-color: transparent !important;
border-bottom: none !important;
}
/* Reset all layout containers for print flow */
@@ -299,7 +301,12 @@ export function printDocumentWithStyles() {
setTimeout(() => {
const cleanupLinks = wrapMediaWithLink();
const cleanupInterlinks = wrapInterlinksWithAnchor();
let cleaned = false;
const cleanup = () => {
if (cleaned) {
return;
}
cleaned = true;
cleanupInterlinks();
cleanupLinks();
cleanupPrintStyles();