mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +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); |     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 <> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran