Improves hello world example

pull/3596/head
Henning Dieterichs 2023-02-24 11:17:59 +01:00
parent 8c0dd6c726
commit 26aff5b514
No known key found for this signature in database
GPG Key ID: 771381EFFDB9EC06
1 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,10 @@
// The Monaco Editor can be easily created, given an
// empty container and an options literal.
// Two members of the literal are "value" and "language".
// The editor takes the full size of its container.
const text = `function hello() {
alert('Hello world!');
}`;
// Hover on each property to see its docs!
monaco.editor.create(document.getElementById("container"), {
value: "function hello() {\n\talert('Hello world!');\n}",
value: text,
language: "javascript",
automaticLayout: true,
});