fix(client/print): ckeditor stylesheet missing

This commit is contained in:
Elian Doran 2025-10-20 10:48:55 +03:00
parent 1514432f77
commit f0fa55715c
No known key found for this signature in database

View File

@ -45,12 +45,15 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) {
const containerRef = useRef<HTMLDivElement>(null); const containerRef = useRef<HTMLDivElement>(null);
useLayoutEffect(() => { useLayoutEffect(() => {
content_renderer.getRenderedContent(note, { async function load() {
noChildrenList: true if (note.type === "text") {
}).then(({$renderedContent}) => { await import("@triliumnext/ckeditor5/src/theme/ck-content.css");
}
const { $renderedContent } = await content_renderer.getRenderedContent(note, { noChildrenList: true });
containerRef.current?.replaceChildren(...$renderedContent); containerRef.current?.replaceChildren(...$renderedContent);
requestAnimationFrame(onReady); }
});
load().then(() => requestAnimationFrame(onReady))
}, [ note ]); }, [ note ]);
return <> return <>