Skip to content

Commit 5fc19b0

Browse files
committed
Lexical: Fixed highlight format action, changed label
1 parent 0a73b70 commit 5fc19b0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lang/en/editor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
'superscript' => 'Superscript',
4949
'subscript' => 'Subscript',
5050
'text_color' => 'Text color',
51+
'highlight_color' => 'Highlight color',
5152
'custom_color' => 'Custom color',
5253
'remove_color' => 'Remove color',
5354
'background_color' => 'Background color',

resources/js/wysiwyg/ui/defaults/buttons/inline-formats.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const bold: EditorButtonDefinition = buildFormatButton('Bold', 'bold', bo
3232
export const italic: EditorButtonDefinition = buildFormatButton('Italic', 'italic', italicIcon);
3333
export const underline: EditorButtonDefinition = buildFormatButton('Underline', 'underline', underlinedIcon);
3434
export const textColor: EditorBasicButtonDefinition = {label: 'Text color', icon: textColorIcon};
35-
export const highlightColor: EditorBasicButtonDefinition = {label: 'Background color', icon: highlightIcon};
35+
export const highlightColor: EditorBasicButtonDefinition = {label: 'Highlight color', icon: highlightIcon};
3636

3737
function colorAction(context: EditorUiContext, property: string, color: string): void {
3838
context.editor.update(() => {
@@ -44,7 +44,7 @@ function colorAction(context: EditorUiContext, property: string, color: string):
4444
}
4545

4646
export const textColorAction = (color: string, context: EditorUiContext) => colorAction(context, 'color', color);
47-
export const highlightColorAction = (color: string, context: EditorUiContext) => colorAction(context, 'color', color);
47+
export const highlightColorAction = (color: string, context: EditorUiContext) => colorAction(context, 'background-color', color);
4848

4949
export const strikethrough: EditorButtonDefinition = buildFormatButton('Strikethrough', 'strikethrough', strikethroughIcon);
5050
export const superscript: EditorButtonDefinition = buildFormatButton('Superscript', 'superscript', superscriptIcon);

0 commit comments

Comments
 (0)