mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Merge pull request #3596 from microsoft/hediet/latin-deer
Improves hello world example
This commit is contained in:
commit
9cb6000aba
1 changed files with 6 additions and 5 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
// The Monaco Editor can be easily created, given an
|
const text = `function hello() {
|
||||||
// empty container and an options literal.
|
alert('Hello world!');
|
||||||
// Two members of the literal are "value" and "language".
|
}`;
|
||||||
// The editor takes the full size of its container.
|
|
||||||
|
|
||||||
|
// Hover on each property to see its docs!
|
||||||
monaco.editor.create(document.getElementById("container"), {
|
monaco.editor.create(document.getElementById("container"), {
|
||||||
value: "function hello() {\n\talert('Hello world!');\n}",
|
value: text,
|
||||||
language: "javascript",
|
language: "javascript",
|
||||||
|
automaticLayout: true,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue