-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
28 lines (26 loc) · 912 Bytes
/
test.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link
rel="stylesheet"
data-name="vs/editor/editor.main"
href="node_modules/monaco-editor/min/vs/editor/editor.main.css"
/>
</head>
<body>
<div id="container" style="width: 800px; height: 600px; border: 1px solid grey"></div>
<script>
var require = { paths: { vs: 'node_modules/monaco-editor/min/vs' } };
</script>
<script src="node_modules/monaco-editor/min/vs/loader.js"></script>
<script src="node_modules/monaco-editor/min/vs/editor/editor.main.nls.js"></script>
<script src="node_modules/monaco-editor/min/vs/editor/editor.main.js"></script>
<script>
var editor = monaco.editor.create(document.getElementById('container'), {
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
language: 'javascript'
});
</script>
</body>
</html>