mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 03:29:02 +01:00 
			
		
		
		
	fix(client/print): ckeditor stylesheet missing
This commit is contained in:
		
							parent
							
								
									1514432f77
								
							
						
					
					
						commit
						f0fa55715c
					
				| @ -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 <> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user