Anki/ts/editor
Henrik Giesel 3642dc6245
Use WithFloating for MathjaxOverlay (#2011)
* Allow passing in reference into WithFloating as prop

* Fix WithAutocomplete

* Fix WithFloating for MathjaxOverlay

* Add resize-store

* Allow passing debug=True to jest_test for debugger support (#2013)

* Disable auto-closing of HTML tags

https://forums.ankiweb.net/t/set-html-editor-as-a-default-editor-instead-of-visual-editor/20988/3

Closes #1963

* Add slight margin to MathjaxEditor

* Enable passing offset and shift to WithFloating

* Hide overflow of mathjax editor

* Add automatic hide functionality to sveltelib/position

* Last polishes for Surrounder class (#2017)

* Make private properties in Surrounder truly private

* Fix remove logic of Surrounder

* No reason for toggleTriggerRemove to be async

* Allow using alt-shift to set all remove formats but this one

* modifyFormat => updateFormat

* Fix formatting

* Fix field descriptions blocking cursor from being set (#2018)

- happens when focus is in HTML editor

* Remove hiding functionality again until it's really useful

* Add support for autoPlacement

* Implement new WithFloating that supports manually calling position()

* Implement hide mechanisms

* Add option in math dropdown to toggle MathJax rendering (#2014)

* Add option in math dropdown to toggle MathJax rendering

Closes #1942

* Hackily redraw the page when toggling MathJax

* Add Fluent string

* Default input setting in fields dialog (#1987) (kleinerpirat)

* Introduce field setting to use plain text editor by default (kleinerpirat)

* Remove leftover function from #1476

* Use boolean instead of string

* Simplify clear_other_field_duplicates

* Convert plain text key to camelCase

* Move HTML item below the existing checkbox, instead of to the right (dae)

Showing it on the right is more space efficient, but feels a bit
cluttered IMHO.

* Fix not being able to scroll when mouse hovers PlainTextInput (#2019)

* Remove overscroll-behavior: none for * (all elements)

* Revert "Remove overscroll-behavior: none for * (all elements)"

This reverts commit 189358908c.

* Use body instead of *, but keep CSS rule

* Unify two CSS rules

* Remove console.logs

* Reposition mathjax menu on switching between inline/block

* Implement WithOverlay

* Implement FloatingArrow

* Display overlay with padding and brighter background

* Rename to MathjaxOverlay

* Simplify MathjaxOverlay component overall

* Rename ImageHandle to image overlay

* Generally fix ImageOverlay again

* Increase z-index of StickyContainer

* Fix setting block or inline on mathjax

* Add reasons in closing-{click,keyup}

* Have both WithFloating and WithOverlay use a simple show flag instead of a store

* Remove subscribe-trigger

* Fix clicking from one mathjax element to another

* Check before executing cleanup

* Do not wait for elements to mount before slotting in With{Floating,Overlay}

* Allow using reference slot for WithFloating and WithOveray

* Add inline argument to options

* Add support for inline slot in WithOvelay

* Use WithFloating for RemoveFormatButton

* Remove last uses of DropdownMenu and WithDropdown

* Remove all of the bootstrap dropdown components

* Fix closing behavior of several buttons and ImageOverlay

* Increase popover padding to 6px

* Find a different way to create some padding at the bottom of the fields

...before the tag editor

@kleinerpirat I think is what this css what trying to achieve?

* Satisfy tests

* Use removeStyleProperties in ImageOverlay

* Use notify function in WithOverlay and WithFloating

* Do not use portal for WithFloating and WithOverlay

Allows for scrolling

* Set hidden to default false in Rich/Plain TextInput

* Reset handle when changing mathjax elements via click

* Restrict size of empty mathjax image

* Prevent sticky labels from obscuring menus

* Remove several overflow-hidden

* Fix empty string being falsy bug when editing mathjax

* Do not import portal anymore

* Use { reason, originalEvent } instead of symbol as update to modified event store

* Fix closing behavior of image overlay (do not close after resize)

* Simplify Collapsible

* Use removeStyleProperties in Collapsible

* Satisfy eslint

* Fix latex shortcuts being mounted

* Fix mathjax overlay not focusable in first field

* Neither hide image overlay on escaped

* Fix Block ButtonDropdown wrapping

* Bring back portal to fix tag editor
2022-09-05 17:20:00 +10:00
..
editor-toolbar Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
image-overlay Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
mathjax-overlay Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
plain-text-input Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
rich-text-input Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
base.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
BrowserEditor.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
BUILD.bazel Plaintext import/export (#1850) 2022-06-01 20:26:16 +10:00
change-timer.ts Add ChangeTimer.prototype.fireImmediately 2021-09-16 14:47:05 +02:00
ClozeButtons.svelte Implement cloze buttons in Mathjax editor (#1860) 2022-05-13 13:04:20 +10:00
code-mirror.ts Disable auto-closing of HTML tags 2022-08-16 12:43:43 +10:00
CodeMirror.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
CollapseBadge.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
DecoratedElements.svelte Fix infinite update loop in editor with invalid input HTML (#1761) 2022-03-31 11:17:13 +10:00
destroyable.ts Fix Cloze button (#1504) 2021-11-24 10:25:24 +10:00
DuplicateLink.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
EditingArea.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
editor-base.scss Add EditorField export (#1915) 2022-06-20 12:07:07 +10:00
EditorField.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
FieldDescription.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
Fields.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
FieldsEditor.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
FieldState.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
FocusTrap.svelte Add some component comment (#1779) 2022-04-19 17:20:26 +10:00
FrameElement.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
HandleBackground.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
HandleControl.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
HandleLabel.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
helpers.ts Introduce setting to collapse field by default (#1990) 2022-08-31 23:34:39 +10:00
icons.ts Field redesign (#2002) 2022-08-19 10:02:28 +10:00
index_browser.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
index_creator.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
index_reviewer.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
LabelContainer.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
LabelName.svelte Editor Field Descriptions (#1476) 2021-11-06 09:42:48 +10:00
legacy.scss Decrease button and tag size for Linux and Windows (#1532) 2021-12-06 19:01:15 +10:00
MathjaxElement.svelte Fix infinite update loop in editor with invalid input HTML (#1761) 2022-03-31 11:17:13 +10:00
NoteCreator.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
NoteEditor.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
Notification.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
old-editor-adapter.ts Plaintext import/export (#1850) 2022-06-01 20:26:16 +10:00
PlainTextBadge.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
PreviewButton.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
ReviewerEditor.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
RichTextBadge.svelte Introduce setting to collapse field by default (#1990) 2022-08-31 23:34:39 +10:00
StickyBadge.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
surround.ts Last polishes for Surrounder class (#2017) 2022-08-17 16:00:37 +10:00
tsconfig.json Plaintext import/export (#1850) 2022-06-01 20:26:16 +10:00