mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
Input WYSIWYG: Added dynamic options for entity selector popups
So that multiple elements on the page can share the same popup, with different search options.
This commit is contained in:
@ -85,7 +85,11 @@ function filePickerCallback(callback, value, meta) {
|
||||
text: entity.name,
|
||||
title: entity.name,
|
||||
});
|
||||
}, selectionText);
|
||||
}, selectionText, {
|
||||
searchEndpoint: '/search/entity-selector',
|
||||
entityTypes: 'page,book,chapter,bookshelf',
|
||||
entityPermission: 'view',
|
||||
});
|
||||
}
|
||||
|
||||
if (meta.filetype === 'image') {
|
||||
|
@ -58,6 +58,10 @@ export function register(editor) {
|
||||
|
||||
editor.selection.collapse(false);
|
||||
editor.focus();
|
||||
}, selectionText);
|
||||
}, selectionText, {
|
||||
searchEndpoint: '/search/entity-selector',
|
||||
entityTypes: 'page,book,chapter,bookshelf',
|
||||
entityPermission: 'view',
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user