summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/lesson.js11
1 files changed, 9 insertions, 2 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");