mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
Update KaTeX to v0.13.9 (#1925)
* Update KaTeX to v0.13.9 * Allow KaTeX commands like \url and \includegraphics https://katex.org/docs/options.html
This commit is contained in:
@@ -134,7 +134,7 @@ async function setContentPane() {
|
||||
if ($content.find('span.math-tex').length > 0) {
|
||||
await libraryLoader.requireLibrary(libraryLoader.KATEX);
|
||||
|
||||
renderMathInElement($content[0], {});
|
||||
renderMathInElement($content[0], {trust: true});
|
||||
}
|
||||
}
|
||||
else if (revisionItem.type === 'code') {
|
||||
|
||||
@@ -24,7 +24,7 @@ async function getRenderedContent(note, options = {}) {
|
||||
if ($renderedContent.find('span.math-tex').length > 0) {
|
||||
await libraryLoader.requireLibrary(libraryLoader.KATEX);
|
||||
|
||||
renderMathInElement($renderedContent[0], {});
|
||||
renderMathInElement($renderedContent[0], {trust: true});
|
||||
}
|
||||
}
|
||||
else if (type === 'code') {
|
||||
|
||||
@@ -224,7 +224,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
|
||||
<script>
|
||||
document.body.className += ' ck-content printed-content';
|
||||
|
||||
renderMathInElement(document.body, {});
|
||||
renderMathInElement(document.body, {trust: true});
|
||||
</script>
|
||||
`,
|
||||
importCSS: false,
|
||||
|
||||
@@ -103,7 +103,7 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget {
|
||||
if (this.$content.find('span.math-tex').length > 0) {
|
||||
await libraryLoader.requireLibrary(libraryLoader.KATEX);
|
||||
|
||||
renderMathInElement(this.$content[0], {});
|
||||
renderMathInElement(this.$content[0], {trust: true});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user