]> BookStack Code Mirror - bookstack/blob - resources/js/wysiwyg/plugins-about.js
Ran eslint fix on existing codebase
[bookstack] / resources / js / wysiwyg / plugins-about.js
1 /**
2  * @param {Editor} editor
3  * @param {String} url
4  */
5 function register(editor, url) {
6     const aboutDialog = {
7         title: 'About the WYSIWYG Editor',
8         url: window.baseUrl('/help/wysiwyg'),
9     };
10
11     editor.ui.registry.addButton('about', {
12         icon: 'help',
13         tooltip: 'About the editor',
14         onAction() {
15             tinymce.activeEditor.windowManager.openUrl(aboutDialog);
16         },
17     });
18 }
19
20 /**
21  * @param {WysiwygConfigOptions} options
22  * @return {register}
23  */
24 export function getPlugin(options) {
25     return register;
26 }