Hi, I'm trying to add custom shortcuts to modern-monaco.
I figured out a few things already.
I can get the underlying monaco instance from lazy() by accessing the workspace:
workspace._monaco.promise.then(monaco => {
const editor = monaco.editor;
editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, () => {
runCustomCode();
});
});
However, I'm running into issues like this:
client.js:3208 Cannot add keybinding because the editor is configured with an unrecognized KeybindingService
warn @ client.js:3208
addAction @ editor-core.mjs:191902
Could you provide an example for how to use the underlying editor instance and add things to it? Thanks!
Hi, I'm trying to add custom shortcuts to modern-monaco.
I figured out a few things already.
I can get the underlying monaco instance from
lazy()by accessing the workspace:However, I'm running into issues like this:
Could you provide an example for how to use the underlying editor instance and add things to it? Thanks!