mirror of
https://github.com/suitenumerique/docs
synced 2026-05-24 09:28:25 +00:00
🐛(frontend) remove comments from print
Some checks failed
Update crowdin sources / install-dependencies (push) Has been cancelled
Docker Hub Workflow / build-and-push-backend (push) Has been cancelled
Docker Hub Workflow / build-and-push-frontend (push) Has been cancelled
Docker Hub Workflow / build-and-push-y-provider (push) Has been cancelled
Build and Push to GHCR / build-and-push-backend (push) Has been cancelled
Build and Push to GHCR / build-and-push-frontend (push) Has been cancelled
Build and Push to GHCR / build-and-push-y-provider (push) Has been cancelled
Helmfile lint / helmfile-lint (push) Has been cancelled
Frontend Workflow / install-dependencies (push) Has been cancelled
Frontend Workflow / test-e2e-chromium (push) Has been cancelled
Main Workflow / install-dependencies (push) Has been cancelled
Main Workflow / lint-git (push) Has been cancelled
Main Workflow / check-changelog (push) Has been cancelled
Main Workflow / lint-changelog (push) Has been cancelled
Main Workflow / lint-spell-mistakes (push) Has been cancelled
Main Workflow / lint-back (push) Has been cancelled
Docker Hub Workflow / notify-argocd (push) Has been cancelled
Frontend Workflow / test-front (push) Has been cancelled
Frontend Workflow / lint-front (push) Has been cancelled
Frontend Workflow / test-e2e-other-browser (push) Has been cancelled
Update crowdin sources / synchronize-with-crowdin (push) Has been cancelled
Frontend Workflow / bundle-size-check (push) Has been cancelled
Frontend Workflow / uikit-theme-checker (push) Has been cancelled
Main Workflow / test-back (push) Has been cancelled
Some checks failed
Update crowdin sources / install-dependencies (push) Has been cancelled
Docker Hub Workflow / build-and-push-backend (push) Has been cancelled
Docker Hub Workflow / build-and-push-frontend (push) Has been cancelled
Docker Hub Workflow / build-and-push-y-provider (push) Has been cancelled
Build and Push to GHCR / build-and-push-backend (push) Has been cancelled
Build and Push to GHCR / build-and-push-frontend (push) Has been cancelled
Build and Push to GHCR / build-and-push-y-provider (push) Has been cancelled
Helmfile lint / helmfile-lint (push) Has been cancelled
Frontend Workflow / install-dependencies (push) Has been cancelled
Frontend Workflow / test-e2e-chromium (push) Has been cancelled
Main Workflow / install-dependencies (push) Has been cancelled
Main Workflow / lint-git (push) Has been cancelled
Main Workflow / check-changelog (push) Has been cancelled
Main Workflow / lint-changelog (push) Has been cancelled
Main Workflow / lint-spell-mistakes (push) Has been cancelled
Main Workflow / lint-back (push) Has been cancelled
Docker Hub Workflow / notify-argocd (push) Has been cancelled
Frontend Workflow / test-front (push) Has been cancelled
Frontend Workflow / lint-front (push) Has been cancelled
Frontend Workflow / test-e2e-other-browser (push) Has been cancelled
Update crowdin sources / synchronize-with-crowdin (push) Has been cancelled
Frontend Workflow / bundle-size-check (push) Has been cancelled
Frontend Workflow / uikit-theme-checker (push) Has been cancelled
Main Workflow / test-back (push) Has been cancelled
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:
parent
48ba77b6d1
commit
0bfc697476
1 changed files with 8 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue