bch*_*rny 3 javascript monaco-editor
我正在使用monaco-editor,我正在尝试为Command + Enter添加自定义处理程序.但是当我按下命令键时,会显示Monaco上下文菜单.是否可以禁用上下文菜单,或将其重新绑定到另一个键?
当然,你可以禁用它,只需设置contextmenu为false;)
monaco.editor.create(document.getElementById("container"), {
value: "function hello() {\n\talert('Hello world!');\n}",
language: "javascript",
// ---------
contextmenu: false, // or set another keyCode here
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
840 次 |
| 最近记录: |