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
BoldButton.svelte
ColorPicker.svelte fix: persist colour picker's custom palette in profile (#4326) 2025-09-17 16:46:53 +10:00
CommandIconButton.svelte
EditorToolbar.svelte
HighlightColorButton.svelte fix: persist colour picker's custom palette in profile (#4326) 2025-09-17 16:46:53 +10:00
ImageOcclusionButton.svelte
index.ts
InlineButtons.svelte
ItalicButton.svelte
LatexButton.svelte
NotetypeButtons.svelte
OptionsButton.svelte
OptionsButtons.svelte
RemoveFormatButton.svelte
RichTextClozeButtons.svelte Cloze button get disabled outside of cloze field (#3879) 2025-04-24 18:37:41 +10:00
SubscriptButton.svelte
SuperscriptButton.svelte
TemplateButtons.svelte
TextAttributeButton.svelte
TextColorButton.svelte fix: persist colour picker's custom palette in profile (#4326) 2025-09-17 16:46:53 +10:00
UnderlineButton.svelte
WithColorHelper.svelte