-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (35 loc) · 840 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
</head>
<body>
<h2>Monaco Editor Sample - Loading with dojo toolkit</h2>
<div id="container" style="width:800px;height:600px;border:1px solid grey"></div>
<script>
// Referencing monaco-editor AMD module
var dojoConfig = {
packages: [
"vs"
],
paths: {
vs: "../monaco-editor/min/vs"
}
};
</script>
<script src="../node_modules/dojo/dojo.js"></script>
<script>
require(['vs/editor/editor.main'], function() {
var editor = monaco.editor.create(document.getElementById('container'), {
value: [
'function x() {',
'\tconsole.log("Hello world!");',
'}'
].join('\n'),
language: 'javascript'
});
});
</script>
</body>
</html>