} from "lexical";
import redoIcon from "@icons/editor/redo.svg";
import sourceIcon from "@icons/editor/source-view.svg";
-import {getEditorContentAsHtml} from "../../../utils/actions";
import fullscreenIcon from "@icons/editor/fullscreen.svg";
+import aboutIcon from "@icons/editor/about.svg";
+import {getEditorContentAsHtml} from "../../../utils/actions";
export const undo: EditorButtonDefinition = {
label: 'Undo',
isActive(selection, context: EditorUiContext) {
return context.containerDOM.classList.contains('fullscreen');
}
+};
+
+export const about: EditorButtonDefinition = {
+ label: 'About the editor',
+ icon: aboutIcon,
+ async action(context: EditorUiContext, button: EditorButton) {
+ const modal = context.manager.createModal('about');
+ modal.show({});
+ },
+ isActive(selection, context: EditorUiContext) {
+ return false;
+ }
};
\ No newline at end of file