aboutsummaryrefslogtreecommitdiffstats
path: root/templates/staff/tables/edit.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/staff/tables/edit.html')
-rw-r--r--templates/staff/tables/edit.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/templates/staff/tables/edit.html b/templates/staff/tables/edit.html
index 421f6c45..b3b9faae 100644
--- a/templates/staff/tables/edit.html
+++ b/templates/staff/tables/edit.html
@@ -32,17 +32,19 @@
<script type="application/javascript">
"use strict";
- let editor = ace.edit("editor");
+ window.onload = () => {
+ let editor = ace.edit("editor");
- editor.session.setMode("ace/mode/json");
- editor.session.setUseWrapMode(true);
+ editor.session.setMode("ace/mode/json");
+ editor.session.setUseWrapMode(true);
- editor.setTheme("ace/theme/iplastic");
- editor.setShowPrintMargin(false);
+ editor.setTheme("ace/theme/iplastic");
+ editor.setShowPrintMargin(false);
- editor.on("input", function() {
- document.getElementById("json").value = editor.getValue();
- });
+ editor.on("input", function () {
+ document.getElementById("json").value = editor.getValue();
+ });
+ };
</script>
</div>
{% endblock %}