NDOJ/resources/pagedown_math.js

15 lines
415 B
JavaScript
Raw Permalink Normal View History

2024-02-26 20:49:52 +00:00
function latex_pagedown($) {
2024-02-05 23:02:49 +00:00
$.each(window.editors, function (id, editor) {
var preview = $('div.wmd-preview#' + id + '_wmd_preview')[0];
editor.hooks.chain('onPreviewRefresh', function () {
renderKatex(preview);
2020-01-21 06:35:58 +00:00
});
2024-02-05 23:02:49 +00:00
renderKatex(preview);
});
2020-01-21 06:35:58 +00:00
}
2024-02-26 20:49:52 +00:00
window.latex_pagedown = latex_pagedown;
2020-01-21 06:35:58 +00:00
$(function () {
2024-02-26 20:49:52 +00:00
(latex_pagedown)('$' in window ? $ : django.jQuery);
2020-01-21 06:35:58 +00:00
});