diff options
author | adityacp | 2016-11-30 17:38:26 +0530 |
---|---|---|
committer | adityacp | 2016-11-30 17:38:26 +0530 |
commit | d0cbfb251f2cd606bee2b9cd7a8692f1d1146b47 (patch) | |
tree | ef07fb7de81b9e03c8096f4defc2f60c476c9ba7 /yaksh/static | |
parent | 9b4416ecee8b7522d1c3f4de25557a31315df397 (diff) | |
download | online_test-d0cbfb251f2cd606bee2b9cd7a8692f1d1146b47.tar.gz online_test-d0cbfb251f2cd606bee2b9cd7a8692f1d1146b47.tar.bz2 online_test-d0cbfb251f2cd606bee2b9cd7a8692f1d1146b47.zip |
Render Instructions from textarea
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/add_quiz.js | 6 |
1 files changed, 6 insertions, 0 deletions
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 = "<p id='rendered_text'></p>" + $(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) { |