You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.8 KiB
HTML
83 lines
1.8 KiB
HTML
9 years ago
|
<!DOCTYPE html>
|
||
3 years ago
|
<!-- THIS IS A GENERATED FILE VIA `npm run simpleserver` -->
|
||
9 years ago
|
<html>
|
||
|
<head>
|
||
|
<base href="..">
|
||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<style>
|
||
|
/*----------------------------------------SAMPLE CSS START*/
|
||
|
|
||
|
.myGlyphMarginClass {
|
||
|
background: red;
|
||
|
}
|
||
|
.myContentClass {
|
||
|
background: lightblue;
|
||
|
}
|
||
|
|
||
|
|
||
|
/*----------------------------------------SAMPLE CSS END*/
|
||
|
</style>
|
||
9 years ago
|
<a class="loading-opts" href="playground.generated/index.html">[<< BACK]</a> <br/>
|
||
3 years ago
|
THIS IS A GENERATED FILE VIA `npm run simpleserver`
|
||
9 years ago
|
|
||
|
<div id="bar" style="margin-bottom: 6px;"></div>
|
||
|
|
||
|
<div style="clear:both"></div>
|
||
|
<div id="outer-container" style="width:800px;height:450px;border: 1px solid grey">
|
||
|
<!-- ----------------------------------------SAMPLE HTML START-->
|
||
|
|
||
3 years ago
|
<div id="container" style="height: 100%"></div>
|
||
9 years ago
|
|
||
|
|
||
|
<!-- ----------------------------------------SAMPLE HTML END-->
|
||
|
</div>
|
||
|
<div style="clear:both"></div>
|
||
|
|
||
3 years ago
|
<script src="../../metadata.js"></script>
|
||
9 years ago
|
<script src="dev-setup.js"></script>
|
||
|
<script>
|
||
|
loadEditor(function() {
|
||
|
/*----------------------------------------SAMPLE JS START*/
|
||
|
|
||
|
var jsCode = [
|
||
|
'"use strict";',
|
||
|
'function Person(age) {',
|
||
|
' if (age) {',
|
||
|
' this.age = age;',
|
||
|
' }',
|
||
|
'}',
|
||
|
'Person.prototype.getAge = function () {',
|
||
|
' return this.age;',
|
||
|
'};'
|
||
|
].join('\n');
|
||
|
|
||
3 years ago
|
var editor = monaco.editor.create(document.getElementById('container'), {
|
||
9 years ago
|
value: jsCode,
|
||
3 years ago
|
language: 'javascript',
|
||
9 years ago
|
glyphMargin: true
|
||
|
});
|
||
|
|
||
3 years ago
|
var decorations = editor.deltaDecorations(
|
||
|
[],
|
||
|
[
|
||
|
{
|
||
|
range: new monaco.Range(3, 1, 3, 1),
|
||
|
options: {
|
||
|
isWholeLine: true,
|
||
|
className: 'myContentClass',
|
||
|
glyphMarginClassName: 'myGlyphMarginClass'
|
||
|
}
|
||
9 years ago
|
}
|
||
3 years ago
|
]
|
||
|
);
|
||
9 years ago
|
|
||
|
// You can now use `decorations` to change or remove the decoration
|
||
|
|
||
|
|
||
5 years ago
|
/*----------------------------------------SAMPLE JS END*/
|
||
9 years ago
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|