* Remove most of the original description placeholder implementation
* Move description showing logic to RichTextInput
- there is no need to propagate it to ContentEditable
* Remove the @html from field-description
This actually worked - however I removed it in case we'd rather offer
markdown support or something else in the future.
* Do not remove placeholder already on focus
- Other editors do not do it either
* Hide via hidden attribute instead of unmounting
* Do not pass content to ContentEditable
* Sort imports
* Change placeholder text color (dae)
In day mode, slightly-grey is almost indistinguishable from black
(at least on the monitor I'm using here)
* Don't use special label for tags column
This was setting the label of whichever column the user chose for tags
to "Tags". Showing field content is more helpful.
* Map tags column automatically like fields
It appears that a variable bound to the `innerHTML` property of
a contenteditable element is only updated when `input` event fires on
the element, and not when changes are made to the DOM programmatically.
* Format scss correctly so it passes ts:format
* Use on and singleCallback in ImageHandle and MathjaxHandle
* Add a few comments
* Fix relict of partial commit
* Fix 'element not found' in ImageHandle
* Remove setting css on image handle twice
* Remove use of container in ImageHandle
* Remove use of container in MathjaxHandle
* Use unprefixed properties of RichTextInputAPI
* Inline api to get to RichTextInputAPI
* Join customStyles into RichTextInputAPI
* Export RichTextInput; Remove SetContext
* Address eslint and svelte_check
- This is useful when you want to set up hooks, etc. on the EditorField
component
- Because when you can only use the NoteEditor export, you cannot notice
when fields are mounted or destroyed
on_all_or_selected_rows_changed() unsets the editor note, but it is
called too late - by that time the note has already been deleted, and
the editor sometimes tries to save the deleted note due to an unfocus/
key timeout.
https://forums.ankiweb.net/t/two-suppr-lead-to-an-empty-warning/20860
Will need to check that this does not regression when #1691 is merged.
* Move field description into EditingArea as placeholder
* Prevent insertion of breaks into empty fields
to allow :empty CSS selector to also work on fields other than the first one.
* Remove redundant setContext from EditingArea
* Fix import order
* Revert "Prevent insertion of breaks into empty fields"
This reverts commit 1615fd5cf441b1047dae6a34265acb9c5cae50b2.
* Use class:empty instead of :empty CSS pseudo-class
* Restrict description to single line, ellipse overflow
* Make description in field dialog a bit clearer
* Allow webviews to opt in to default D&D handling
* Remove redundant webview.js include
* Block default drag & drop behavior in reviewing screens
* Fix mypy error
* Fix footer moving upwards
* Fix column detection
Was broken because escaped line breaks were not considered.
Also removes delimiter detection on `#columns:` line. User must use tabs
or set delimiter beforehand.
* Add CSV preview
* Parse `#tags column:`
* Optionally export deck and notetype with CSV
* Avoid clones in CSV export
* Prevent bottom of page appearing under footer (dae)
* Increase padding to 1em (dae)
With 0.5em, when a vertical scrollbar is shown, it sits right next to
the right edge of the content, making it look like there's no right
margin.
* Experimental changes to make table fit+scroll (dae)
- limit individual cells to 15em, and show ellipses when truncated
- limit total table width to body width, so that inner table is shown
with scrollbar
- use class rather than id - ids are bad practice in Svelte components,
as more than one may be displayed on a single page
* Skip importing foreign notes with filtered decks
Were implicitly imported into the default deck before.
Also some refactoring to fetch deck ids and names beforehand.
* Hide spacer below hidden field mapping
* Fix guid being replaced when updating note
* Fix dupe identity check
Canonify tags before checking if dupe is identical, but only add update
tags later if appropriate.
* Fix deck export for notes with missing card 1
* Fix note lines starting with `#`
csv crate doesn't support escaping a leading comment char. :(
* Support import/export of guids
* Strip HTML from preview rows
* Fix initially set deck if current is filtered
* Make isHtml toggle reactive
* Fix `html_to_text_line()` stripping sound names
* Tweak export option labels
* Switch to patched rust-csv fork
Fixes writing lines starting with `#`, so revert 5ece10ad05f331.
* List column options with first column field
* Fix flag for exports with HTML stripped
* update get_linux_dark_mode to use freedesktop.org standard
* Update CONTRIBUTORS
* run formatter
* Update CONTRIBUTORS
* allow for multiple dark mode detection strategies on Linux
* string -> str
* update docstring
* Update CONTRIBUTORS