Commit 120cbfd9 authored by Boris Kocherov's avatar Boris Kocherov

demo/with_monaco: remove duplication

parent a0e92aba
......@@ -67,8 +67,7 @@ importScripts('https://unpkg.com/monaco-editor@0.14.3/min/vs/base/worker/workerM
.then(s => {
return {
uri: mappedUrl || schemaUrl,
schema: s,
schema_url: mappedUrl || schemaUrl
schema: s
};
});
};
......@@ -84,7 +83,7 @@ importScripts('https://unpkg.com/monaco-editor@0.14.3/min/vs/base/worker/workerM
return g.render({
key: "rjs_json_form",
schema: schemas[0].schema,
schema_url: schemas[0].schema_url,
schema_url: schemas[0].uri,
value: {}
});
});
......@@ -97,7 +96,7 @@ importScripts('https://unpkg.com/monaco-editor@0.14.3/min/vs/base/worker/workerM
monacoSchemaEditor = monaco.editor.create(
document.getElementById("monaco-schema"),
{
model: monaco.editor.createModel(JSON.stringify(schemas[0].schema, null, 2), "json", schemas[0].schema_url)
model: monaco.editor.createModel(JSON.stringify(schemas[0].schema, null, 2), "json", schemas[0].uri)
}
);
......@@ -115,7 +114,7 @@ importScripts('https://unpkg.com/monaco-editor@0.14.3/min/vs/base/worker/workerM
return g.render({
key: "rjs_json_form",
schema: parsed,
schema_url: schemas[0].schema_url,
schema_url: schemas[0].uri,
});
});
}
......@@ -142,7 +141,7 @@ importScripts('https://unpkg.com/monaco-editor@0.14.3/min/vs/base/worker/workerM
return g.render({
key: "rjs_json_form",
schema: schemas[0].schema,
schema_url: schemas[0].schema_url,
schema_url: schemas[0].uri,
value: parsed
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment