-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (42 loc) · 974 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Monaco YAML</title>
<style>
html,
body,
#editor {
height: 100%;
}
body {
margin: 0;
}
#editor {
width: 100%;
}
</style>
</head>
<body>
<div id="editor"></div>
<script type="module" src="index.js"></script>
<script>
function loadEditor(content, theme) {
window.codeEditor = window.yamlEditor.create(document.getElementById('editor'), 'a://b/ivy.yaml', content, theme);
}
let content = `# yaml-language-server: $schema=https://json-schema.axonivy.com/ivy/11.3.1/ivy.json
SecuritySystems:
azure:
`
let params = new URLSearchParams(window.location.search);
if (params.get("demo") === "off") {
content = ""
}
const theme = params.get("theme");
if (theme === undefined) {
theme = "light"
}
window.onload = function () { loadEditor(content, theme); };
</script>
</body>
</html>