diff --git a/apps/client/src/print.tsx b/apps/client/src/print.tsx index 96cf06132..86d98b113 100644 --- a/apps/client/src/print.tsx +++ b/apps/client/src/print.tsx @@ -45,12 +45,15 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) { const containerRef = useRef(null); useLayoutEffect(() => { - content_renderer.getRenderedContent(note, { - noChildrenList: true - }).then(({$renderedContent}) => { + async function load() { + if (note.type === "text") { + await import("@triliumnext/ckeditor5/src/theme/ck-content.css"); + } + const { $renderedContent } = await content_renderer.getRenderedContent(note, { noChildrenList: true }); containerRef.current?.replaceChildren(...$renderedContent); - requestAnimationFrame(onReady); - }); + } + + load().then(() => requestAnimationFrame(onReady)) }, [ note ]); return <>