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 don't show "double click to expand" when it's not possible (#4030) 2025-05-22 23:21:08 +10:00
mathjax-overlay place caret after mathjax element on overlay close event (#4016) 2025-05-19 13:43:01 +10:00
plain-text-input Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
rich-text-input Cloze button get disabled outside of cloze field (#3879) 2025-04-24 18:37:41 +10:00
base.ts Update to Svelte 5 (#3292) 2024-09-25 18:49:07 +10:00
BrowserEditor.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
ClozeButtons.svelte Fix 'same cloze' shortcut on macOS 2025-07-18 18:12:30 +07:00
code-mirror.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
CodeMirror.svelte Update to Svelte 5 (#3292) 2024-09-25 18:49:07 +10:00
CollapseBadge.svelte Update dprint (#3376) 2024-08-22 18:24:56 +07:00
CollapseLabel.svelte Followup to #4122 (make text selectable) (#4132) 2025-06-29 14:42:19 +07:00
decorated-elements.ts Remove use of createClassComponent in mathjax-element.ts (#3919) 2025-04-13 16:21:22 +10:00
destroyable.ts Re-enable formatting for .ts files 2022-11-28 09:33:04 +10:00
DuplicateLink.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
EditingArea.svelte Cleanup old TODO (#3903) 2025-04-11 20:38:20 +10:00
editor-base.scss Use system font for webviews instead of bootstrap font stack and add exception for note editor (#4163) 2025-07-08 00:51:44 +07:00
EditorField.svelte Cloze button get disabled outside of cloze field (#3879) 2025-04-24 18:37:41 +10:00
FieldDescription.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
Fields.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
FieldState.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
HandleBackground.svelte Update to Svelte 5 (#3292) 2024-09-25 18:49:07 +10:00
HandleControl.svelte Update to Svelte 5 (#3292) 2024-09-25 18:49:07 +10:00
HandleLabel.svelte Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
helpers.ts Refactor plain/rich text input toggling code; fix focus loss (#2479) 2023-04-22 16:08:25 +10:00
index.ts Merge the separate editor index files 2023-07-03 17:24:27 +10:00
LabelContainer.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
LabelName.svelte FIX: Margin between icon was selectable but shouldn't be (#4122) 2025-06-28 21:47:29 +03:00
legacy.scss Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
NoteCreator.svelte Re-enable formatting for .svelte files 2022-11-28 09:17:39 +10:00
NoteEditor.svelte Cloze button get disabled outside of cloze field (#3879) 2025-04-24 18:37:41 +10:00
Notification.svelte Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
old-editor-adapter.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
PlainTextBadge.svelte Fix remaining accessibility warnings (#3241) 2024-07-10 19:55:08 +07:00
PreviewButton.svelte Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
ReviewerEditor.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
RichTextBadge.svelte Fix remaining accessibility warnings (#3241) 2024-07-10 19:55:08 +07:00
StickyBadge.svelte Use tilted (filled and unfilled) sticky icons in the cards editor (#3825) 2025-02-16 22:24:11 +07:00
surround.ts Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
types.ts Propagate editor UI state transitions to add-ons (#2711) 2023-10-13 08:47:50 +10:00