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