mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32: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,41 @@
|
|||
var jsCodeArr = [
|
||||
'// ------------------------------',
|
||||
'// ------------------------------',
|
||||
'function Person(age) {',
|
||||
' if (age) {',
|
||||
' this.age = age;',
|
||||
' }',
|
||||
'}',
|
||||
'Person.prototype.getAge = function () {',
|
||||
' return this.age;',
|
||||
'};',
|
||||
'',
|
||||
''
|
||||
];
|
||||
|
||||
jsCodeArr = jsCodeArr.concat(jsCodeArr.slice(0));
|
||||
jsCodeArr = jsCodeArr.concat(jsCodeArr.slice(0));
|
||||
jsCodeArr = jsCodeArr.concat(jsCodeArr.slice(0));
|
||||
|
||||
jsCodeArr[49] +=
|
||||
'And this is some long line. And this is some long line. And this is some long line. And this is some long line. And this is some long line. ';
|
||||
|
||||
var editor = monaco.editor.create(document.getElementById('container'), {
|
||||
value: jsCodeArr.join('\n'),
|
||||
language: 'javascript'
|
||||
});
|
||||
|
||||
editor.revealPositionInCenter({ lineNumber: 50, column: 120 });
|
||||
// Also see:
|
||||
// - editor.revealLine
|
||||
// - editor.revealLineInCenter
|
||||
// - editor.revealLineInCenterIfOutsideViewport
|
||||
// - editor.revealLines
|
||||
// - editor.revealLinesInCenter
|
||||
// - editor.revealLinesInCenterIfOutsideViewport
|
||||
// - editor.revealPosition
|
||||
// - editor.revealPositionInCenter
|
||||
// - editor.revealPositionInCenterIfOutsideViewport
|
||||
// - editor.revealRange
|
||||
// - editor.revealRangeInCenter
|
||||
// - editor.revealRangeInCenterIfOutsideViewport
|
||||
Loading…
Add table
Add a link
Reference in a new issue