mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Move website files to /website/
This commit is contained in:
parent
430d8e6e17
commit
d9013a86c4
191 changed files with 9 additions and 9 deletions
|
|
@ -0,0 +1 @@
|
|||
<div id="container" style="height: 100%"></div>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
// Through the options literal, the behaviour of the editor can be easily customized.
|
||||
// Here are a few examples of config options that can be passed to the editor.
|
||||
// You can also call editor.updateOptions at any time to change the options.
|
||||
|
||||
var editor = monaco.editor.create(document.getElementById('container'), {
|
||||
value: "// First line\nfunction hello() {\n\talert('Hello world!');\n}\n// Last line",
|
||||
language: 'javascript',
|
||||
|
||||
lineNumbers: 'off',
|
||||
roundedSelection: false,
|
||||
scrollBeyondLastLine: false,
|
||||
readOnly: false,
|
||||
theme: 'vs-dark'
|
||||
});
|
||||
setTimeout(function () {
|
||||
editor.updateOptions({
|
||||
lineNumbers: 'on'
|
||||
});
|
||||
}, 2000);
|
||||
|
|
@ -0,0 +1 @@
|
|||
<div id="container" style="height: 100%"></div>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
<div id="container" style="height: 100%"></div>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// 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.
|
||||
|
||||
monaco.editor.create(document.getElementById('container'), {
|
||||
value: "function hello() {\n\talert('Hello world!');\n}",
|
||||
language: 'javascript'
|
||||
});
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<pre id="code" data-lang="text/css" style="width: 500px">
|
||||
/* Some example CSS */
|
||||
|
||||
@import url("something.css");
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 3em 6em;
|
||||
font-family: tahoma, arial, sans-serif;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#navigation a {
|
||||
font-weight: bold;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.7em;
|
||||
}
|
||||
|
||||
h1:before, h2:before {
|
||||
content: "some contents";
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: courier, monospace;
|
||||
font-size: 80%;
|
||||
color: #418A8A;
|
||||
}
|
||||
</pre>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
// The colorizeElement-function will read the data-lang-attribute
|
||||
// from the element to select the correct language mode. In this
|
||||
// sample it is text/css.
|
||||
monaco.editor.colorizeElement(document.getElementById('code'));
|
||||
Loading…
Add table
Add a link
Reference in a new issue