Adding examples

Adding an example with the monaco webpack plugin
This commit is contained in:
atomicpages 2019-05-22 08:07:16 -07:00
parent 3ec5c9d2e3
commit 27b10e31fa
5 changed files with 6330 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import * as monaco from "monaco-editor";
(function () {
// create div to avoid needing a HtmlWebpackPlugin template
const div = document.createElement('div');
div.id = 'root';
div.style = 'width:800px; height:600px; border:1px solid #ccc;';
document.body.appendChild(div);
})();
monaco.editor.create(
document.getElementById('root'),
{
value: `const foo = () => 0;`,
language: 'javascript',
theme: 'vs-dark'
}
);