mirror of
https://github.com/suitenumerique/docs.git
synced 2026-08-17 21:25:43 +02:00
🐛(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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user