mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 09:16:30 -05:00
feat(frontend): add basic print functionality
Co-authored-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
8a1b29fddc
commit
d7a3d0ff54
4 changed files with 21 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
@import "./github-markdown";
|
||||
@import "./markdown-tweaks";
|
||||
@import "./reveal";
|
||||
@import "./print";
|
||||
|
||||
.text-black, body[data-bs-theme=dark] .text-black {
|
||||
color: $black;
|
||||
|
|
10
frontend/global-styles/print.scss
Normal file
10
frontend/global-styles/print.scss
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*!
|
||||
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
@media print {
|
||||
.heading-anchor {
|
||||
display: none;
|
||||
}
|
||||
}
|
|
@ -9,7 +9,11 @@
|
|||
*/
|
||||
export const printIframe = (): void => {
|
||||
const iframe = document.getElementById('editor-renderer-iframe') as HTMLIFrameElement
|
||||
<<<<<<< HEAD
|
||||
if (!iframe) {
|
||||
=======
|
||||
if (!iframe || !iframe.contentWindow) {
|
||||
>>>>>>> 279f6cd89 (feat(frontend): add basic print functionality)
|
||||
return
|
||||
}
|
||||
iframe.contentWindow.print()
|
||||
|
|
|
@ -15,3 +15,9 @@
|
|||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.markdown-toc-sidebar-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue