Added back in image options context toolbar item

This commit is contained in:
Dan Brown 2022-07-18 13:37:50 +01:00
parent cd929b2555
commit 6a6f00058f
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -54,6 +54,20 @@ function registerLinkContextToolbar(editor) {
});
}
/**
* @param {Editor} editor
*/
function registerImageContextToolbar(editor) {
editor.ui.registry.addContextToolbar('imagecontexttoolbar', {
predicate(node) {
return node.closest('img') !== null;
},
position: 'node',
scope: 'node',
items: 'image'
});
}
/**
* @param {Editor} editor
* @param {WysiwygConfigOptions} options
@ -61,4 +75,5 @@ function registerLinkContextToolbar(editor) {
export function registerAdditionalToolbars(editor, options) {
registerPrimaryToolbarGroups(editor);
registerLinkContextToolbar(editor);
registerImageContextToolbar(editor);
}