Anki is a smart spaced repetition flashcard program
Find a file
Henrik Giesel 739e286b0b
Fix some Mathjax issues (#1547)
* Move move-nodes logic into domlib

Refactor input-manager

Refactor out FocusTrap from EditingArea

Remove unnecessary selecting of node from surround

Add onInput interface to input-manager

Create MathjaxElement.svelte

- This should contain all the setup necessary for displaying
  <anki-mathjax> elements in the rich text input
- Does not contain setup necessary for Mathjax Overlay

Deal with backwards deletion, when caret inside anki-mathjax

Set mathjax elements contenteditable=false

Do not undecorate mathjaxx element on disconnect

- Fixes issues, where Mathjax might undecorate when it is moved into a
  different div

Add framed element custom element

Introduce iterateActions to allow global hooks for RichTextInput

Remove some old code

Deal with deletion of frame handles

Make Anki frame and frame handles restore each other

Make FrameElement restore its structure upon modification

Frame and strip off framing from MathjaxElement automatically

Move FrameHandle to separate FrameStart/FrameEnd

Refactor FrameHandle

Set data-frames on FrameElement

Fix logic error connected to FrameElement

Communicate frameHandle move{in,out} to anki-mathjax

Clear selection when blurring ContentEditable

Make sure frame is destroyed when undecorating Mathjax

Use Hairline space instead of zeroWidth

- it has better behavior in the contenteditable when placing the caret
  via clicking

Allow detection of block elements with `block` attribute

- This way, anki-mathjax block="true" will make field a
field be recognized to have block content

Make block frame element operater without handles

- Clicking on the left/right side of a block mathjax will insert a br
  element to that side

When deleting, remove mathajax-element not just image

Update MathjaxButtons to correctly show block state

SelectAll when moving into inline anki mathjax

Remove CodeMirror autofocus functionality

Move it to Mathjaxeditor directly

Fix getRangeAt throwing error

Update older code to use cross-browser

Fix issue with FrameHandles not being properyly removed

Satisfy formatting

Use === instead of node.isSameNode()

Fix issue of focusTrap not initialized

* Fix after rebasing

* Fix focus not being moved to first field

* Add documentation for input-manager and iterate-actions

* Export logic of ContentEditable to content-editable

* Fix issue with inserting newline right next to inline Mathjax

* Fix reframing issue of Mathjax Svelte component

* Allow for deletion of Inline Mathjax again

* Rename iterate-actions to action-list

* Add copyright header

* Split off frame-handle from frame-element

* Add some comments for framing process

* Add mising return types
2022-01-08 11:46:01 +10:00
.buildkite fix linkchecker invocation in CI 2021-12-20 17:41:13 +10:00
.github/ISSUE_TEMPLATE update bug report template 2021-11-12 12:20:02 +10:00
cargo move linkchecker into separate crate 2021-12-20 17:27:43 +10:00
docs tweaks to development.md 2021-12-24 14:12:36 +10:00
ftl New TTS/AV tag handling (#1559) 2021-12-17 19:04:42 +10:00
platforms use x86 binaries for clang format/protobuf on Mac 2021-10-16 18:07:39 +10:00
proto Change Notetype UI Rework (#1499) 2021-11-24 12:09:55 +10:00
pylib Increment sched.reps for preview cards in V2 (#1573) 2022-01-04 08:56:02 +10:00
python run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
qt Add "X-GNOME-SingleWindow=true" to the desktop file (#1572) 2022-01-04 08:53:22 +10:00
rslib Fix new preview card's position being interpreted as a date (#1577) 2022-01-06 19:52:54 +10:00
sass add color-scheme: dark in night mode 2021-12-28 13:35:19 +10:00
scripts run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
ts Fix some Mathjax issues (#1547) 2022-01-08 11:46:01 +10:00
.bazelignore move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.bazelrc update to Rust 1.57 + latest rules_rust 2021-12-03 20:35:52 +10:00
.bazelversion update Bazel version 2021-10-01 20:54:48 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
.prettierignore Mathjax editor improvements (#1502) 2021-11-23 10:27:32 +10:00
.prettierrc Mathjax editor improvements (#1502) 2021-11-23 10:27:32 +10:00
bazel.bat initial Bazel conversion 2020-11-01 14:26:58 +10:00
BUILD.bazel Fix prettier after moving node_modules to repo dir (#1413) 2021-10-09 10:13:14 +10:00
Cargo.lock move linkchecker into separate crate 2021-12-20 17:27:43 +10:00
Cargo.toml move linkchecker into separate crate 2021-12-20 17:27:43 +10:00
CONTRIBUTORS Minor changes to graphs (#1566) 2021-12-29 15:04:15 +10:00
defs.bzl update to edition 2021 2021-11-18 20:51:10 +10:00
late_deps.bzl download wheels using rules_python 2021-10-15 16:02:26 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
package.json update Node deps 2021-12-03 20:35:53 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
repos.bzl update rules_rust 2021-12-20 17:28:52 +10:00
run get PyQt working directly with ./run on macOS 2021-10-16 18:07:29 +10:00
run.bat enable Python warnings when running 2020-12-16 14:59:04 +10:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
WORKSPACE move node_modules into root folder [action required] 2021-10-07 11:42:27 +10:00
yarn.lock update Node deps 2021-12-03 20:35:53 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.