Closed ErBlack closed 5 months ago
Your CodeEditor
component should look like this:
export function CodeEditor({ name }) {
const handleMount = useCallback((editor) => {
editor.addAction({
keybindings: [2080],
run: command,
label: "test",
id: name,
});
}, []);
return <Editor className="Editor" path={name} onMount={handleMount} />;
}
@suren-atoyan how to remove the already addAction . How to rename an already displayed context menu or redefine an existing context menu。 How to delete an action that has already been defined using addAction. I need to define different context menus based on different languages.
Describe the bug We use a form with three monaco editors in one page. They have a different name props
list of options
Add command code
To Reproduce
Steps to reproduce the behavior:
Code sandbox
Expected behavior Command will be executed in focused editor