Skip to content

Commit

Permalink
fix(json-editor): use inputVal instead of jsonVal for json-editor.mus…
Browse files Browse the repository at this point in the history
…tache since it's no longer needed following changes to TranslatableValue and AbstractProperty/Input
  • Loading branch information
JoelAlphonso authored and mcaskill committed Mar 5, 2024
1 parent b2cda4a commit 013573b
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
<script src="/assets/admin/jsoneditor/jsoneditor.min.js"></script>
{{/ addJsRequirement }}

{{=<% %>=}}
<%# jsonVal %>
<script>
const jsonVal_<% inputId %> = <%& . %>;
</script>
<%/ jsonVal %>
<%={{ }}=%>

{{# addJs }}
<script>
var container = document.getElementById("{{ inputId }}");
Expand All @@ -31,9 +23,8 @@
};
var editor = new JSONEditor(container, options);
{{# jsonVal }}
editor.set(jsonVal_{{ inputId }});
document.getElementById('hidden_{{ inputId }}').value = editor.getText();
{{/ jsonVal }}
{{# inputVal }}
editor.set({{& inputVal }});
{{/ inputVal }}
</script>
{{/ addJs }}

0 comments on commit 013573b

Please sign in to comment.