mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	feat(content_renderer): render docnotes
This commit is contained in:
		
							parent
							
								
									32f84e8378
								
							
						
					
					
						commit
						3457c2e4d8
					
				| @ -13,6 +13,7 @@ import imageContextMenuService from "../menus/image_context_menu.js"; | |||||||
| import { applySingleBlockSyntaxHighlight, applySyntaxHighlight } from "./syntax_highlight.js"; | import { applySingleBlockSyntaxHighlight, applySyntaxHighlight } from "./syntax_highlight.js"; | ||||||
| import { loadElkIfNeeded, postprocessMermaidSvg } from "./mermaid.js"; | import { loadElkIfNeeded, postprocessMermaidSvg } from "./mermaid.js"; | ||||||
| import { normalizeMimeTypeForCKEditor } from "./mime_type_definitions.js"; | import { normalizeMimeTypeForCKEditor } from "./mime_type_definitions.js"; | ||||||
|  | import renderDoc from "./doc_renderer.js"; | ||||||
| 
 | 
 | ||||||
| let idCounter = 1; | let idCounter = 1; | ||||||
| 
 | 
 | ||||||
| @ -54,6 +55,9 @@ async function getRenderedContent(this: {} | { ctx: string }, entity: FNote | FA | |||||||
|         await renderService.render(entity, $content); |         await renderService.render(entity, $content); | ||||||
| 
 | 
 | ||||||
|         $renderedContent.append($content); |         $renderedContent.append($content); | ||||||
|  |     } else if (type === "doc" && "noteId" in entity) { | ||||||
|  |         const $content = await renderDoc(entity); | ||||||
|  |         $renderedContent.html($content.html()); | ||||||
|     } else if (!options.tooltip && type === "protectedSession") { |     } else if (!options.tooltip && type === "protectedSession") { | ||||||
|         const $button = $(`<button class="btn btn-sm"><span class="bx bx-log-in"></span> Enter protected session</button>`).on("click", protectedSessionService.enterProtectedSession); |         const $button = $(`<button class="btn btn-sm"><span class="bx bx-log-in"></span> Enter protected session</button>`).on("click", protectedSessionService.enterProtectedSession); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran