BookStackApp_BookStack/resources/js/wysiwyg-tinymce/plugins-about.js
Dan Brown 5a4f595341
Editors: Added lexical editor for testing
Started basic playground for testing lexical as a new WYSIWYG editor.
Moved out tinymce to be under wysiwyg-tinymce instead so lexical is the
default, but TinyMce code remains.
2024-05-27 15:39:41 +01:00

25 lines
490 B
JavaScript

/**
* @param {Editor} editor
*/
function register(editor) {
const aboutDialog = {
title: 'About the WYSIWYG Editor',
url: window.baseUrl('/help/wysiwyg'),
};
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;
}