~dricottone/noticable

ref: 8f8d6306064243ddbb3829f000ef159768c77a79 noticable/index.html -rw-r--r-- 780 bytes
8f8d6306Dominic Ricottone initial try with electron 3 years ago
                                                                                
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
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Test</title>
    <meta name="descrption" content="" />
    <style>
#container {
  width: 500px;
  height: 300px;
  border: 1px solid #ccc;
}
    </style>
  </head>
  <body>
    <div id="container"></div>
    <script src="node_modules/monaco-editor/min/vs/loader.js"></script>
    <script>
require.config({ paths: { vs: 'node_modules/monaco-editor/min/vs' } });

require(['vs/editor/editor.main'], function () {
  const editor = monaco.editor.create(document.getElementById('container'), {
    value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
    language: 'javascript'
  });
});
    </script>
  </body>
</html>