Move from mathjax to katex

This commit is contained in:
cuom1999 2024-02-05 17:02:49 -06:00
parent b2c9be7bda
commit 08d2437d49
35 changed files with 64 additions and 214 deletions

View file

@ -1,13 +1,12 @@
function mathjax_pagedown($) {
if ('MathJax' in window) {
$.each(window.editors, function (id, editor) {
var preview = $('div.wmd-preview#' + id + '_wmd_preview')[0];
editor.hooks.chain('onPreviewRefresh', function () {
MathJax.typeset(preview);
});
MathJax.typeset(preview);
$.each(window.editors, function (id, editor) {
console.log(id);
var preview = $('div.wmd-preview#' + id + '_wmd_preview')[0];
editor.hooks.chain('onPreviewRefresh', function () {
renderKatex(preview);
});
}
renderKatex(preview);
});
}
window.mathjax_pagedown = mathjax_pagedown;