We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8480e6c commit de8b389Copy full SHA for de8b389
json_editor/templates/django_json_editor/django_json_editor.html
@@ -7,14 +7,14 @@
7
iconlib: "fontawesome4",
8
schema: {{ schema|safe }}
9
};
10
- var editor = new JSONEditor(container, options);
11
- editor.on('change', function () {
12
- var json = editor.getValue();
+ var {{ name }}_editor = new JSONEditor(container, options);
+ {{ name }}_editor.on('change', function () {
+ var json = {{ name }}_editor.getValue();
13
document.getElementById("id_{{ name }}").value = JSON.stringify(json);
14
});
15
{% if data %}
16
var json = {{ data|safe }};
17
- editor.setValue(json)
+ {{ name }}_editor.setValue(json)
18
{% endif %}
19
</script>
20
0 commit comments