1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Lexical: Added ui container type

Structured UI logical to be fairly standard and mostly covered via
a base class that handles context and core dom work.
This commit is contained in:
Dan Brown
2024-05-29 20:38:31 +01:00
parent 483d9bf26c
commit dc1a40ea74
12 changed files with 240 additions and 110 deletions

View File

@ -0,0 +1,43 @@
import {EditorButton} from "./framework/buttons";
import {
blockquote, bold, code,
dangerCallout,
h2, h3, h4, h5,
infoCallout, italic, link, paragraph,
redo, strikethrough, subscript,
successCallout, superscript, underline,
undo,
warningCallout
} from "./defaults/button-definitions";
import {EditorContainerUiElement, EditorFormatMenu} from "./framework/containers";
export function getMainEditorFullToolbar(): EditorContainerUiElement {
return new EditorContainerUiElement([
new EditorButton(undo),
new EditorButton(redo),
new EditorFormatMenu([
new EditorButton(h2),
new EditorButton(h3),
new EditorButton(h4),
new EditorButton(h5),
new EditorButton(blockquote),
new EditorButton(paragraph),
new EditorButton(infoCallout),
new EditorButton(successCallout),
new EditorButton(warningCallout),
new EditorButton(dangerCallout),
]),
new EditorButton(bold),
new EditorButton(italic),
new EditorButton(underline),
new EditorButton(strikethrough),
new EditorButton(superscript),
new EditorButton(subscript),
new EditorButton(code),
new EditorButton(link),
]);
}