diff --git a/src/lib/editor/ColorPicker.svelte b/src/lib/editor/ColorPicker.svelte index ad001ba..a2d0bf8 100644 --- a/src/lib/editor/ColorPicker.svelte +++ b/src/lib/editor/ColorPicker.svelte @@ -9,6 +9,7 @@ defaultColor, title, chevronTitle, + clearLabel = 'Automatic', open = $bindable(false), onApply, onClear, @@ -21,6 +22,7 @@ defaultColor: string; title: string; chevronTitle: string; + clearLabel?: string; open?: boolean; onApply: (color: string, range: { from: number; to: number }) => void; onClear: (range: { from: number; to: number }) => void; @@ -374,7 +376,7 @@ class="color-automatic" class:active={currentColor === null} onclick={clearColor} - >Automatic + >{clearLabel}
{#each COLOR_PALETTE as row}
diff --git a/src/lib/editor/ToolbarExpanded.svelte b/src/lib/editor/ToolbarExpanded.svelte index 534947a..d879878 100644 --- a/src/lib/editor/ToolbarExpanded.svelte +++ b/src/lib/editor/ToolbarExpanded.svelte @@ -760,6 +760,7 @@ defaultColor="#FFFF00" title="Highlight color" chevronTitle="Choose highlight color" + clearLabel="No color" bind:open={highlightColorOpen} onOpen={() => onColorPickerOpen('highlight')} onApply={(c, r) => editor?.chain().focus().setTextSelection(r).setHighlight({ color: c }).run()}