anki/ts/editable
Damien Elmes ae18ba2a05 Switch editor to full MathJax package to fix broken autoloads
Re: https://forums.ankiweb.net/t/anki-2-1-53-release-candidate/20122/2

Autoloads in MathJax are asynchronous, and the caller is expected to
use asynchronous APIs when they are in use [1]. The editor uses the synchronous
tex2svg(), which throws a "MathJax retry" error when an autoload package
has not yet loaded. Attempting to use the package before it has loaded
appears to break future invocations as well, so the package fails to work
at all until a new webview is created.

The following HTML will reproduce the issue when added to a single card
in a new profile:

```
<strong>6&nbsp; &nbsp;&nbsp;</strong>Every combination of <anki-mathjax>\boldsymbol{v}=(1,-2,1)</anki-mathjax> and <anki-mathjax>\boldsymbol{w}=(0,1,-1)</anki-mathjax> has components that add to&nbsp; _____.<br>
```

Ideally we'd switch the MathJax rendering to be asynchronous, but that
didn't work well when I tried it in #1862. For now I've just switched
to the full package, which adds about 130KB to the final minified JS
(2.76MB), and likely slows down editor loading somewhat.

[1] https://github.com/mathjax/MathJax/issues/2557#issuecomment-727655089
2022-05-21 14:01:38 +10:00
..
BUILD.bazel Use same config for editor and reviewer Mathjax (#1865) 2022-05-13 13:23:35 +10:00
content-editable.ts Allow using keyup with registerShortcut (#1755) 2022-03-29 09:28:44 +10:00
ContentEditable.svelte Fix insert media always insert at the start (on Windows) (#1684) 2022-02-25 10:59:06 +10:00
decorated.ts Fix plain text (#1689) 2022-02-25 11:14:26 +10:00
editable-base.scss Fix custom CSS not being applied to scrollbars in night mode (#1525) 2021-12-05 08:20:42 +10:00
frame-element.ts Fix Mathjax sometimes being deleted even though it's not selected (#1696) 2022-02-27 17:58:01 +10:00
frame-handle.ts Fix cursor sometimes not being moved into mathjax editor (#1737) 2022-03-24 18:29:30 +10:00
icons.ts update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
index.ts Change how resizable images work (#1859) 2022-05-13 12:57:07 +10:00
mathjax-element.ts Transform <br> in Mathjax to newlines (#1866) 2022-05-16 14:42:10 +10:00
Mathjax.svelte Instead of transforming to {\lt}, transform to &lt; (#1818) 2022-04-25 13:42:54 +10:00
mathjax.ts Switch editor to full MathJax package to fix broken autoloads 2022-05-21 14:01:38 +10:00
ResizableImage.svelte Change how resizable images work (#1859) 2022-05-13 12:57:07 +10:00
tsconfig.json Use same config for editor and reviewer Mathjax (#1865) 2022-05-13 13:23:35 +10:00