Anki/ts/editor
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
..
editor-toolbar fix: persist colour picker's custom palette in profile (#4326) 2025-09-17 16:46:53 +10:00
image-overlay
mathjax-overlay
plain-text-input
rich-text-input
base.ts
BrowserEditor.svelte
ClozeButtons.svelte Fix 'same cloze' shortcut on macOS 2025-07-18 18:12:30 +07:00
code-mirror.ts
CodeMirror.svelte
CollapseBadge.svelte
CollapseLabel.svelte
decorated-elements.ts
destroyable.ts
DuplicateLink.svelte
EditingArea.svelte
editor-base.scss
EditorField.svelte
FieldDescription.svelte
Fields.svelte
FieldState.svelte
HandleBackground.svelte
HandleControl.svelte
HandleLabel.svelte
helpers.ts
index.ts
LabelContainer.svelte
LabelName.svelte
legacy.scss
NoteCreator.svelte
NoteEditor.svelte
Notification.svelte
old-editor-adapter.ts
PlainTextBadge.svelte
PreviewButton.svelte
ReviewerEditor.svelte
RichTextBadge.svelte
StickyBadge.svelte
surround.ts
types.ts