mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-07 03:14:33 +08:00
Added help/about box to wysiwyg editor
- To display license info along with shortcuts. - Extracted out plain layout from 503 error page. - Added tests to ensure license references are as expected.
This commit is contained in:
29
resources/js/wysiwyg/plugins-about.js
Normal file
29
resources/js/wysiwyg/plugins-about.js
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @param {Editor} editor
|
||||
* @param {String} url
|
||||
*/
|
||||
function register(editor, url) {
|
||||
|
||||
const aboutDialog = {
|
||||
title: 'About the WYSIWYG Editor',
|
||||
url: window.baseUrl('/help/wysiwyg'),
|
||||
};
|
||||
|
||||
editor.ui.registry.addButton('about', {
|
||||
icon: 'help',
|
||||
tooltip: 'About the editor',
|
||||
onAction() {
|
||||
tinymce.activeEditor.windowManager.openUrl(aboutDialog);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {WysiwygConfigOptions} options
|
||||
* @return {register}
|
||||
*/
|
||||
export function getPlugin(options) {
|
||||
return register;
|
||||
}
|
Reference in New Issue
Block a user