From de9ac5e647622f0e9908bf830a4a962306d350a1 Mon Sep 17 00:00:00 2001 From: adityacp Date: Thu, 27 Aug 2020 17:25:36 +0530 Subject: Add mathjax support in lesson and module --- yaksh/static/yaksh/js/lesson.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/js/lesson.js b/yaksh/static/yaksh/js/lesson.js index 55d4846..6eaf6c6 100644 --- a/yaksh/static/yaksh/js/lesson.js +++ b/yaksh/static/yaksh/js/lesson.js @@ -32,13 +32,10 @@ $(document).ready(function(){ }); }); - function preview_text(data){ - var preview_div = $("#preview_text_div"); - if (!preview_div.is(":visible")){ - $("#preview_text_div").toggle(); - } + function preview_text(data) { $("#description_body").empty(); - $("#description_body").append(data); + $("#description_body").html(data); + MathJax.Hub.Queue(["Typeset",MathJax.Hub]); } $("#embed").click(function() { -- cgit