Anki/ts/editor/editor-toolbar
llama 80cff16250
fix: persist colour picker's custom palette in profile (#4326)
* add SaveCustomColours rpc method

* restore custom colour palette on editor init

* save custom colour palette on colour picker open and input

there doesn't seem to be an event fired when the picker is
cancelled/closed, so it's still possible for work to be lost

* save colours on `change` instead of `input`

`input` is supposed to be fired on every adjustment to the picker
whereas `change` is only fired when the picker is accepted, but qt
seems to treat both as the latter, so this is currently a no-op

* Store colors in the collection

One minor tweak to the logic while I was there: an invalid color no
longer invalidates all the rest.

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-09-17 16:46:53 +10:00
..
AddonButtons.svelte Fix add-on buttons not working in the editor (#3941) 2025-04-24 15:26:46 +10:00
BlockButtons.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00
BoldButton.svelte Revert "Decide if element is bold by getComputedStyle (#2453) (#2579)" 2024-10-11 23:34:50 +10:00
ColorPicker.svelte fix: persist colour picker's custom palette in profile (#4326) 2025-09-17 16:46:53 +10:00
CommandIconButton.svelte Fix editor loses focus when toggling list if list item empty (#3483) 2024-10-16 00:38:35 +10:00
EditorToolbar.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
HighlightColorButton.svelte fix: persist colour picker's custom palette in profile (#4326) 2025-09-17 16:46:53 +10:00
ImageOcclusionButton.svelte Add keyboard shortcuts for empty cards and toggle mask on image occlusion (#3136) 2024-04-25 17:19:38 +10:00
index.ts Refactor how toolbar buttons get to surround within editor fields (#1931) 2022-08-15 13:34:16 +10:00
InlineButtons.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
ItalicButton.svelte Revert "Decide if element is bold by getComputedStyle (#2453) (#2579)" 2024-10-11 23:34:50 +10:00
LatexButton.svelte Remove use of createClassComponent in mathjax-element.ts (#3919) 2025-04-13 16:21:22 +10:00
NotetypeButtons.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
OptionsButton.svelte Remove use of createClassComponent in mathjax-element.ts (#3919) 2025-04-13 16:21:22 +10:00
OptionsButtons.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
RemoveFormatButton.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00
RichTextClozeButtons.svelte Cloze button get disabled outside of cloze field (#3879) 2025-04-24 18:37:41 +10:00
SubscriptButton.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00
SuperscriptButton.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00
TemplateButtons.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00
TextAttributeButton.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
TextColorButton.svelte fix: persist colour picker's custom palette in profile (#4326) 2025-09-17 16:46:53 +10:00
UnderlineButton.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00
WithColorHelper.svelte Svg icon (#3135) 2024-04-24 02:37:31 +01:00