]> BookStack Code Mirror - bookstack/commitdiff
Lexical: Fixed highlight format action, changed label
authorDan Brown <redacted>
Thu, 24 Jul 2025 12:48:00 +0000 (13:48 +0100)
committerDan Brown <redacted>
Thu, 24 Jul 2025 12:48:00 +0000 (13:48 +0100)
lang/en/editor.php
resources/js/wysiwyg/ui/defaults/buttons/inline-formats.ts

index 752c6f3f702b61603c4f76536eaeff659d11681b..0d250e9a7bd6e4382fa6b1e55199b9eacff5d5a6 100644 (file)
@@ -48,6 +48,7 @@ return [
     'superscript' => 'Superscript',
     'subscript' => 'Subscript',
     'text_color' => 'Text color',
+    'highlight_color' => 'Highlight color',
     'custom_color' => 'Custom color',
     'remove_color' => 'Remove color',
     'background_color' => 'Background color',
index c5b7ad29ad9c6be63548854d506f1e8944ef231f..11411e14041fd258faa49e848ffa6a44c78c5f5a 100644 (file)
@@ -32,7 +32,7 @@ export const bold: EditorButtonDefinition = buildFormatButton('Bold', 'bold', bo
 export const italic: EditorButtonDefinition = buildFormatButton('Italic', 'italic', italicIcon);
 export const underline: EditorButtonDefinition = buildFormatButton('Underline', 'underline', underlinedIcon);
 export const textColor: EditorBasicButtonDefinition = {label: 'Text color', icon: textColorIcon};
-export const highlightColor: EditorBasicButtonDefinition = {label: 'Background color', icon: highlightIcon};
+export const highlightColor: EditorBasicButtonDefinition = {label: 'Highlight color', icon: highlightIcon};
 
 function colorAction(context: EditorUiContext, property: string, color: string): void {
     context.editor.update(() => {
@@ -44,7 +44,7 @@ function colorAction(context: EditorUiContext, property: string, color: string):
 }
 
 export const textColorAction = (color: string, context: EditorUiContext) => colorAction(context, 'color', color);
-export const highlightColorAction = (color: string, context: EditorUiContext) => colorAction(context, 'color', color);
+export const highlightColorAction = (color: string, context: EditorUiContext) => colorAction(context, 'background-color', color);
 
 export const strikethrough: EditorButtonDefinition = buildFormatButton('Strikethrough', 'strikethrough', strikethroughIcon);
 export const superscript: EditorButtonDefinition = buildFormatButton('Superscript', 'superscript', superscriptIcon);