mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
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.
This commit is contained in:
24
resources/js/wysiwyg-tinymce/plugins-about.js
Normal file
24
resources/js/wysiwyg-tinymce/plugins-about.js
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @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;
|
||||
}
|
Reference in New Issue
Block a user