Unregister Selection Submenu

Is there any way to unregister selection submenu? I still struggle to find out the sub menu id of Selection sub menu

Hi @sbstr1,

the Selection submenu uses the id 3_selection. A more maintainable way to remove it would be through its constant:

const selection = MonacoMenus.SELECTION; // imported from '@theia/monaco/lib/browser/monaco-menu'
const selectionId = selection[selection.length - 1];
registry.unregisterMenuNode(selectionId);
1 Like