Add call to options.onCreateMenu
to allow customisation of context menu items
This commit is contained in:
parent
2bd4ca67af
commit
5d833d2131
|
@ -4372,6 +4372,10 @@ Node.prototype.showContextMenu = function (anchor, onClose) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.editor.options.onCreateMenu) {
|
||||||
|
items = this.editor.options.onCreateMenu(items, node);
|
||||||
|
}
|
||||||
|
|
||||||
var menu = new ContextMenu(items, {close: onClose});
|
var menu = new ContextMenu(items, {close: onClose});
|
||||||
menu.show(anchor, this.editor.frame);
|
menu.show(anchor, this.editor.frame);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue