Cloned DMOJ
This commit is contained in:
parent
f623974b58
commit
49dc9ff10c
513 changed files with 132349 additions and 39 deletions
17
resources/pagedown_math.js
Normal file
17
resources/pagedown_math.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
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.Hub.Queue(["Typeset", MathJax.Hub, preview]);
|
||||
});
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, preview]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
window.mathjax_pagedown = mathjax_pagedown;
|
||||
|
||||
$(window).load(function () {
|
||||
(mathjax_pagedown)('$' in window ? $ : django.jQuery);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue