sample.js 355 B

123456789
  1. // The Monaco Editor can be easily created, given an
  2. // empty container and an options literal.
  3. // Two members of the literal are "value" and "language".
  4. // The editor takes the full size of its container.
  5. monaco.editor.create(document.getElementById("container"), {
  6. value: "function hello() {\n\talert('Hello world!');\n}",
  7. language: "javascript"
  8. });