]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/ui/defaults/toolbars.ts
Lexical: Added a media toolbar, improved toolbars and media selection
[bookstack] / resources / js / wysiwyg / ui / defaults / toolbars.ts
index 61baa3c3260a8ffce186cf2ede150c8419d304dc..cdc451d088bc08c02a003eac320773b868996f6b 100644 (file)
@@ -44,11 +44,11 @@ import {
 } from "./buttons/block-formats";
 import {
     bold, clearFormating, code,
-    highlightColor,
+    highlightColor, highlightColorAction,
     italic,
     strikethrough, subscript,
     superscript,
-    textColor,
+    textColor, textColorAction,
     underline
 } from "./buttons/inline-formats";
 import {
@@ -114,10 +114,10 @@ export function getMainEditorFullToolbar(context: EditorUiContext): EditorContai
             new EditorButton(italic),
             new EditorButton(underline),
             new EditorDropdownButton({ button: new EditorColorButton(textColor, 'color') }, [
-                new EditorColorPicker('color'),
+                new EditorColorPicker(textColorAction),
             ]),
             new EditorDropdownButton({button: new EditorColorButton(highlightColor, 'background-color')}, [
-                new EditorColorPicker('background-color'),
+                new EditorColorPicker(highlightColorAction),
             ]),
             new EditorButton(strikethrough),
             new EditorButton(superscript),
@@ -224,6 +224,10 @@ export function getImageToolbarContent(): EditorUiElement[] {
     return [new EditorButton(image)];
 }
 
+export function getMediaToolbarContent(): EditorUiElement[] {
+    return [new EditorButton(media)];
+}
+
 export function getLinkToolbarContent(): EditorUiElement[] {
     return [
         new EditorButton(link),