diff options
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/lesson.js | 11 | ||||
-rw-r--r-- | yaksh/static/yaksh/js/show_toc.js | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/yaksh/static/yaksh/js/lesson.js b/yaksh/static/yaksh/js/lesson.js index 2cc2e62..586ae18 100644 --- a/yaksh/static/yaksh/js/lesson.js +++ b/yaksh/static/yaksh/js/lesson.js @@ -1,13 +1,20 @@ $(document).ready(function() { - MathJax.Hub.Queue(["Typeset", MathJax.Hub]); var simplemde = new SimpleMDE({ element: document.getElementById("id_description"), forceSync: true, hideIcons: ["preview", "side-by-side", "fullscreen"] }); simplemde.codemirror.on("change", function() { - MathJax.Hub.Queue(["Typeset", MathJax.Hub]); $("#description_body").html(simplemde.markdown(simplemde.value())); + renderMathInElement( + document.body, + { + delimiters: [ + {left: "$$", right: "$$", display: false}, + {left: "$", right: "$", display: true}, + ] + } + ); }); const player = new Plyr('#player'); var timer = $("#vtimer"); diff --git a/yaksh/static/yaksh/js/show_toc.js b/yaksh/static/yaksh/js/show_toc.js index 7d9b68e..a2507d0 100644 --- a/yaksh/static/yaksh/js/show_toc.js +++ b/yaksh/static/yaksh/js/show_toc.js @@ -13,7 +13,7 @@ $(document).ready(function() { }); }, max_height: 400, - height: 400, + height: 200, plugins: "image code link", convert_urls: false }); |