From d0cbfb251f2cd606bee2b9cd7a8692f1d1146b47 Mon Sep 17 00:00:00 2001 From: adityacp Date: Wed, 30 Nov 2016 17:38:26 +0530 Subject: Render Instructions from textarea --- yaksh/static/yaksh/js/add_quiz.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/js/add_quiz.js b/yaksh/static/yaksh/js/add_quiz.js index 3da4d5c..a026ec0 100644 --- a/yaksh/static/yaksh/js/add_quiz.js +++ b/yaksh/static/yaksh/js/add_quiz.js @@ -7,6 +7,12 @@ function test() { document.getElementById("submit").innerHTML = "Save"; } + var template = "
" + $(template).insertBefore("#id_instructions"); + $('#id_instructions').bind('keypress', function (event){ + document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ; + }); + document.getElementById('rendered_text').innerHTML = document.getElementById('id_instructions').value ; } String.prototype.beginsWith = function (string) { -- cgit