mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-08 04:40:45 +08: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 {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);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user