mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
fix(client/print): ckeditor stylesheet missing
This commit is contained in:
@@ -45,12 +45,15 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) {
|
||||
const containerRef = useRef<HTMLDivElement>(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 <>
|
||||
|
||||
Reference in New Issue
Block a user