mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +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 { loadElkIfNeeded, postprocessMermaidSvg } from "./mermaid.js";
|
||||
import { normalizeMimeTypeForCKEditor } from "./mime_type_definitions.js";
|
||||
import renderDoc from "./doc_renderer.js";
|
||||
|
||||
let idCounter = 1;
|
||||
|
||||
@ -54,6 +55,9 @@ async function getRenderedContent(this: {} | { ctx: string }, entity: FNote | FA
|
||||
await renderService.render(entity, $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") {
|
||||
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