mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-25 17:57:28 +08:00
5a4f595341
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.
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/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;
|
|
}
|