summaryrefslogtreecommitdiff
path: root/static/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/app.js')
-rw-r--r--static/app.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/static/app.js b/static/app.js
index 7da442b..36f6c89 100644
--- a/static/app.js
+++ b/static/app.js
@@ -1,3 +1,14 @@
+window.onkeyup = keyup;
+var inputText;
+
+function keyup(e) {
+ // inputText = e.target.value;
+ inputText = parseOrg();
+
+ const preview = document.getElementById("preview");
+ preview.innerHTML = inputText;
+}
+
function parseOrg() {
var orgCode = document.getElementById("editor").value;
var orgParser = new Org.Parser();