mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 12:45:39 +01:00
Adopt latest editor in samples
This commit is contained in:
parent
6328b62e22
commit
6ce435ec23
17 changed files with 2859 additions and 2643 deletions
|
|
@ -13,9 +13,6 @@ var editor = monaco.editor.create(document.getElementById("container"), {
|
|||
});
|
||||
|
||||
// Explanation:
|
||||
// Try right clicking on an identifier or keyword => the action will be enabled (due to `tokensAtPosition`)
|
||||
// Try right clicking on a string => the action will be disabled (due to `tokensAtPosition`)
|
||||
// Try right clicking on whitespace => the action will be disabled (due to `wordAtPosition`)
|
||||
// Press F1 (Alt-F1 in IE) => the action will appear and run if it is enabled
|
||||
// Press Ctrl-F10 => the action will run if it is enabled
|
||||
|
||||
|
|
@ -29,6 +26,10 @@ editor.addAction({
|
|||
// An optional array of keybindings for the action.
|
||||
keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.F10],
|
||||
|
||||
// A precondition for this action.
|
||||
precondition: null,
|
||||
|
||||
// A rule to evaluate on top of the precondition in order to dispatch the keybindings.
|
||||
keybindingContext: null,
|
||||
|
||||
contextMenuGroupId: 'navigation',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue