Browse Source

Merge pull request #3726 from PmcFizz/patch-1

opt example
Henning Dieterichs 2 years ago
parent
commit
fe18f2e950

+ 2 - 2
website/src/website/data/playground-samples/interacting-with-the-editor/adding-a-command-to-an-editor-instance/sample.js

@@ -28,7 +28,7 @@ editor.addCommand(
 	monaco.KeyCode.Tab,
 	function () {
 		// services available in `ctx`
-		alert("my command is executing!");
+		console.log("my command is executing!");
 	},
 	"myCondition1 && myCondition2"
 );
@@ -36,7 +36,7 @@ editor.addCommand(
 myCondition1.set(true);
 
 setTimeout(function () {
-	alert("now enabling also myCondition2, try pressing Tab!");
+	console.log("now enabling also myCondition2, try pressing Tab!");
 	// @ts-ignore
 	myCondition2.set(true);
 	// you can use myCondition2.reset() to go back to the default