Adopt latest editor in samples

This commit is contained in:
Alex Dima 2017-07-03 14:15:09 +02:00
parent 6328b62e22
commit 6ce435ec23
17 changed files with 2859 additions and 2643 deletions

View file

@ -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',