]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/ui/toolbars.ts
Lexical: Added basic list button/support
[bookstack] / resources / js / wysiwyg / ui / toolbars.ts
index 337266617396fb12524c9c81a4d90d4ebfbf284e..fe19b94ed7a95e666a11f43b956291ec8cf8c0a2 100644 (file)
@@ -1,16 +1,20 @@
-import {EditorButton, FormatPreviewButton} from "./framework/buttons";
+import {EditorButton} from "./framework/buttons";
 import {
-    blockquote, bold, clearFormating, code,
+    blockquote, bold, bulletList, clearFormating, code,
     dangerCallout, details,
-    h2, h3, h4, h5, image,
-    infoCallout, italic, link, paragraph,
+    h2, h3, h4, h5, highlightColor, image,
+    infoCallout, italic, link, numberList, paragraph,
     redo, source, strikethrough, subscript,
-    successCallout, superscript, underline,
+    successCallout, superscript, taskList, textColor, underline,
     undo,
     warningCallout
 } from "./defaults/button-definitions";
-import {EditorContainerUiElement, EditorFormatMenu, EditorSimpleClassContainer} from "./framework/containers";
+import {EditorContainerUiElement, EditorSimpleClassContainer} from "./framework/core";
 import {el} from "../helpers";
+import {EditorFormatMenu} from "./framework/blocks/format-menu";
+import {FormatPreviewButton} from "./framework/blocks/format-preview-button";
+import {EditorDropdownButton} from "./framework/blocks/dropdown-button";
+import {EditorColorPicker} from "./framework/blocks/color-picker";
 
 
 export function getMainEditorFullToolbar(): EditorContainerUiElement {
@@ -37,12 +41,23 @@ export function getMainEditorFullToolbar(): EditorContainerUiElement {
         new EditorButton(bold),
         new EditorButton(italic),
         new EditorButton(underline),
+        new EditorDropdownButton(textColor, [
+            new EditorColorPicker('color'),
+        ]),
+        new EditorDropdownButton(highlightColor, [
+            new EditorColorPicker('background-color'),
+        ]),
         new EditorButton(strikethrough),
         new EditorButton(superscript),
         new EditorButton(subscript),
         new EditorButton(code),
         new EditorButton(clearFormating),
 
+        // Lists
+        new EditorButton(bulletList),
+        new EditorButton(numberList),
+        new EditorButton(taskList),
+
         // Insert types
         new EditorButton(link),
         new EditorButton(image),