diff options
| author | Christian Cleberg <[email protected]> | 2024-03-22 21:55:34 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2024-03-22 21:55:34 -0500 |
| commit | cbc25df5b41af8500d089646e4ce739a4ef521cf (patch) | |
| tree | 881eacdf8dd1618855b70700fee586bb7d1c0e48 /static/app.js | |
| parent | b052eec657cfcb8822b7070b0473fe1c6705238c (diff) | |
| download | org-live-cbc25df5b41af8500d089646e4ce739a4ef521cf.tar.gz org-live-cbc25df5b41af8500d089646e4ce739a4ef521cf.tar.bz2 org-live-cbc25df5b41af8500d089646e4ce739a4ef521cf.zip | |
create live preview pane
Diffstat (limited to 'static/app.js')
| -rw-r--r-- | static/app.js | 11 |
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(); |
