mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-25 03:45:25 +08:00

Some checks failed
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
analyse-php / build (push) Has been cancelled
lint-js / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
Re-used existing route and moved tinymce help to its own different route. Added test to cover. Added new external-content block to support in editor UI.
25 lines
490 B
JavaScript
25 lines
490 B
JavaScript
/**
|
|
* @param {Editor} editor
|
|
*/
|
|
function register(editor) {
|
|
const aboutDialog = {
|
|
title: 'About the WYSIWYG Editor',
|
|
url: window.baseUrl('/help/tinymce'),
|
|
};
|
|
|
|
editor.ui.registry.addButton('about', {
|
|
icon: 'help',
|
|
tooltip: 'About the editor',
|
|
onAction() {
|
|
window.tinymce.activeEditor.windowManager.openUrl(aboutDialog);
|
|
},
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @return {register}
|
|
*/
|
|
export function getPlugin() {
|
|
return register;
|
|
}
|