|
|
|
@ -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);
|
|
|
|
|
|
|
|
|
|
|
|
|