mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
support math in read only text notes
This commit is contained in:
parent
32e3560dce
commit
313b9dba61
2
libraries/ckeditor/ckeditor.js
vendored
2
libraries/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,7 @@
|
|||||||
import treeCache from "../../services/tree_cache.js";
|
import treeCache from "../../services/tree_cache.js";
|
||||||
import AbstractTextTypeWidget from "./abstract_text_type_widget.js";
|
import AbstractTextTypeWidget from "./abstract_text_type_widget.js";
|
||||||
import treeService from "../../services/tree.js";
|
import treeService from "../../services/tree.js";
|
||||||
|
import libraryLoader from "../../services/library_loader.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
<div class="note-detail-readonly-text note-detail-printable">
|
<div class="note-detail-readonly-text note-detail-printable">
|
||||||
@ -82,6 +83,12 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget {
|
|||||||
|
|
||||||
this.loadIncludedNote(noteId, $(el));
|
this.loadIncludedNote(noteId, $(el));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.$content.find('span.math-tex').length > 0) {
|
||||||
|
await libraryLoader.requireLibrary(libraryLoader.KATEX);
|
||||||
|
|
||||||
|
renderMathInElement(this.$content[0], {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async refreshIncludedNoteEvent({noteId}) {
|
async refreshIncludedNoteEvent({noteId}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user