feat: add table context to contextmenu and getRangeContext api #576

This commit is contained in:
Hufe921
2024-05-18 20:56:58 +08:00
parent 28f6bdbb41
commit 149c95f952
6 changed files with 63 additions and 8 deletions
+12
View File
@@ -30,3 +30,15 @@ Usage:
```javascript
const contextMenuList = await instance.register.getContextMenuList()
```
Remark:
```javascript
// Example of modifying internal contextmenu
contextmenuList.forEach(menu => {
// Find the menu item through the menu key and modify its properties
if (menu.key === INTERNAL_CONTEXT_MENU_KEY.GLOBAL.PASTE) {
menu.when = () => false
}
})
```