mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Update sample.js
This commit is contained in:
parent
f20e0c8d47
commit
c5006e9dfe
1 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ editor.addCommand(
|
||||||
monaco.KeyCode.Tab,
|
monaco.KeyCode.Tab,
|
||||||
function () {
|
function () {
|
||||||
// services available in `ctx`
|
// services available in `ctx`
|
||||||
alert("my command is executing!");
|
console.log("my command is executing!");
|
||||||
},
|
},
|
||||||
"myCondition1 && myCondition2"
|
"myCondition1 && myCondition2"
|
||||||
);
|
);
|
||||||
|
|
@ -36,7 +36,7 @@ editor.addCommand(
|
||||||
myCondition1.set(true);
|
myCondition1.set(true);
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
alert("now enabling also myCondition2, try pressing Tab!");
|
console.log("now enabling also myCondition2, try pressing Tab!");
|
||||||
myCondition2.set(true);
|
myCondition2.set(true);
|
||||||
// you can use myCondition2.reset() to go back to the default
|
// you can use myCondition2.reset() to go back to the default
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue