2020-01-21 06:35:58 +00:00
|
|
|
function mathjax_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
|
|
|
}
|
|
|
|
|
|
|
|
window.mathjax_pagedown = mathjax_pagedown;
|
|
|
|
|
2023-02-20 23:15:13 +00:00
|
|
|
$(function () {
|
2020-01-21 06:35:58 +00:00
|
|
|
(mathjax_pagedown)('$' in window ? $ : django.jQuery);
|
|
|
|
});
|