mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Added back in image options context toolbar item
This commit is contained in:
parent
cd929b2555
commit
6a6f00058f
@ -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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user