Open MichaelPanwenjie opened 2 years ago
onCreateMenu: function (items, node) { // next, just for fun, let's remove any menu separators (again just at the // top level menu). A menu separator is an item with a type : 'separator' // property items = items.filter(function (item) { return item.type !== 'separator' })
// finally we need to return the items array. If we don't, the menu
// will be empty.
return items
}
How to let above codes work duo to there is no items and node parameter in the Angular Wapper?
I currently don't use this library and have the time maintaining it. Feel free to create a MR. :)
I want to delete some menus when operating, but when i use onCreateMenu function,It has no any parameter but the ordinary liberary has parameter,How can I use it?
In ordinary liberary : this.editorOptions.onCreateMenu = (items, node) => { items.filter()... }
but now:
Can anyone help to use onCreateMenu to filter the menus? Thanks!