|
|
|
|
@ -4,6 +4,7 @@ import { applySyntaxHighlight } from "../../services/syntax_highlight.js";
|
|
|
|
|
import { getMermaidConfig } from "../mermaid.js";
|
|
|
|
|
import type FNote from "../../entities/fnote.js";
|
|
|
|
|
import type { EventData } from "../../components/app_context.js";
|
|
|
|
|
import { getLocaleById } from "../../services/i18n.js";
|
|
|
|
|
|
|
|
|
|
const TPL = `
|
|
|
|
|
<div class="note-detail-readonly-text note-detail-printable">
|
|
|
|
|
@ -100,6 +101,11 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget {
|
|
|
|
|
// (see https://github.com/zadam/trilium/issues/1590 for example of such conflict)
|
|
|
|
|
await libraryLoader.requireLibrary(libraryLoader.CKEDITOR);
|
|
|
|
|
|
|
|
|
|
const languageCode = note.getLabelValue("language");
|
|
|
|
|
const correspondingLocale = getLocaleById(languageCode);
|
|
|
|
|
const isRtl = correspondingLocale?.rtl;
|
|
|
|
|
this.$content.attr("dir", isRtl ? "rtl" : "ltr");
|
|
|
|
|
|
|
|
|
|
const blob = await note.getBlob();
|
|
|
|
|
|
|
|
|
|
this.$content.html(blob?.content ?? "");
|
|
|
|
|
|