From 5d833d213183faa04d6ca3a99643e1e17457870d Mon Sep 17 00:00:00 2001 From: RobAley Date: Sun, 17 Feb 2019 11:16:14 +0000 Subject: [PATCH] Add call to options.onCreateMenu to allow customisation of context menu items --- src/js/Node.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/Node.js b/src/js/Node.js index e3a41e3..d478300 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -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}); menu.show(anchor, this.editor.frame); };