// Initialize the editor with a JSON schema
var editor = new JSONEditor(document.getElementById('editor_holder'), {
- // https://www.winterrodeln.org/mediawiki/index.php?title=Winterrodeln:Datenschema/Rodelbahn/V1.json&action=raw
- schema: {"$ref": "{{schema_url}}"},
+ schema: {"$ref": {{schema_url|tojson}}},
theme: 'bootstrap4',
ajax: true
});
editor.on('ready',() => {
- // https://www.winterrodeln.org/mediawiki/index.php?title=Latschenh%C3%BCtte/Rodelbahn.json&action=raw
- fetch("{{json_url}}").then(
+ fetch({{json_url|tojson}}).then(
function(response) {
return response.json();
}).then(