mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added back in image options context toolbar item
This commit is contained in:
@ -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 {Editor} editor
|
||||||
* @param {WysiwygConfigOptions} options
|
* @param {WysiwygConfigOptions} options
|
||||||
@ -61,4 +75,5 @@ function registerLinkContextToolbar(editor) {
|
|||||||
export function registerAdditionalToolbars(editor, options) {
|
export function registerAdditionalToolbars(editor, options) {
|
||||||
registerPrimaryToolbarGroups(editor);
|
registerPrimaryToolbarGroups(editor);
|
||||||
registerLinkContextToolbar(editor);
|
registerLinkContextToolbar(editor);
|
||||||
|
registerImageContextToolbar(editor);
|
||||||
}
|
}
|
Reference in New Issue
Block a user