mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
run in IE11
This commit is contained in:
parent
7104a97f34
commit
b7194c4617
1 changed files with 18 additions and 14 deletions
|
|
@ -179,7 +179,7 @@ function createButton(label, onClick) {
|
||||||
function createOptions(editor) {
|
function createOptions(editor) {
|
||||||
var options = document.getElementById('options');
|
var options = document.getElementById('options');
|
||||||
|
|
||||||
let lineNumbers;
|
var lineNumbers;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'lineNumbers',
|
'lineNumbers',
|
||||||
|
|
@ -189,10 +189,10 @@ function createOptions(editor) {
|
||||||
function(editor, newValue) {
|
function(editor, newValue) {
|
||||||
lineNumbers = newValue;
|
lineNumbers = newValue;
|
||||||
editor.updateOptions({ lineNumbers: lineNumbers ? 'on' : 'off' });
|
editor.updateOptions({ lineNumbers: lineNumbers ? 'on' : 'off' });
|
||||||
},
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let glyphMargin;
|
var glyphMargin;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'glyphMargin',
|
'glyphMargin',
|
||||||
|
|
@ -205,7 +205,7 @@ function createOptions(editor) {
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let minimap;
|
var minimap;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'minimap',
|
'minimap',
|
||||||
|
|
@ -218,7 +218,7 @@ function createOptions(editor) {
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let roundedSelection;
|
var roundedSelection;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'roundedSelection',
|
'roundedSelection',
|
||||||
|
|
@ -231,31 +231,33 @@ function createOptions(editor) {
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let scrollBeyondLastLine;
|
var scrollBeyondLastLine;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'scrollBeyondLastLine',
|
'scrollBeyondLastLine',
|
||||||
function() {
|
function() {
|
||||||
return (scrollBeyondLastLine === false ? false : true);
|
return (scrollBeyondLastLine === false ? false : true);
|
||||||
}, function(editor, newValue) {
|
},
|
||||||
|
function(editor, newValue) {
|
||||||
scrollBeyondLastLine = newValue;
|
scrollBeyondLastLine = newValue;
|
||||||
editor.updateOptions({ scrollBeyondLastLine: scrollBeyondLastLine });
|
editor.updateOptions({ scrollBeyondLastLine: scrollBeyondLastLine });
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let renderWhitespace;
|
var renderWhitespace;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'renderWhitespace',
|
'renderWhitespace',
|
||||||
function() {
|
function() {
|
||||||
return (renderWhitespace === true ? true : false);
|
return (renderWhitespace === true ? true : false);
|
||||||
}, function(editor, newValue) {
|
},
|
||||||
|
function(editor, newValue) {
|
||||||
renderWhitespace = newValue;
|
renderWhitespace = newValue;
|
||||||
editor.updateOptions({ renderWhitespace: renderWhitespace });
|
editor.updateOptions({ renderWhitespace: renderWhitespace });
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let readOnly;
|
var readOnly;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'readOnly',
|
'readOnly',
|
||||||
|
|
@ -268,25 +270,27 @@ function createOptions(editor) {
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let wordWrap;
|
var wordWrap;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'wordWrap',
|
'wordWrap',
|
||||||
function() {
|
function() {
|
||||||
return (wordWrap === true ? true : false);
|
return (wordWrap === true ? true : false);
|
||||||
}, function(editor, newValue) {
|
},
|
||||||
|
function(editor, newValue) {
|
||||||
wordWrap = newValue;
|
wordWrap = newValue;
|
||||||
editor.updateOptions({ wordWrap: wordWrap ? 'on' : 'off' });
|
editor.updateOptions({ wordWrap: wordWrap ? 'on' : 'off' });
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
let folding;
|
var folding;
|
||||||
options.appendChild(createOptionToggle(
|
options.appendChild(createOptionToggle(
|
||||||
editor,
|
editor,
|
||||||
'folding',
|
'folding',
|
||||||
function() {
|
function() {
|
||||||
return (folding === false ? false : true);
|
return (folding === false ? false : true);
|
||||||
}, function(editor, newValue) {
|
},
|
||||||
|
function(editor, newValue) {
|
||||||
folding = newValue;
|
folding = newValue;
|
||||||
editor.updateOptions({ folding: folding });
|
editor.updateOptions({ folding: folding });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue