- basic mode is the default, and includes only HTML elements that can be
added/edited easily with the default editor
- extended mode is enabled by holding down shift and includes a bunch of
other HTML elements
- pasting in prewrap mode had been broken for a while and nobody noticed
- needs changes to export code and cloze handling code to deal with the
newlines
- newline rewriting in filterNode() is likely fragile
- may revisit post 2.1
- drop support for $$ in favour of separate opening and closing tags
- add shortcuts to add mathjax
- don't highlight any clozes in blue if field contains mathjax chars
the shortcut keys are handled by webengine on platforms other than
osx, so rather than messing with an event filter we catch the cut and
copy events in js and send a signal back
This is meant to more closely replicate Anki 2.0.x`s _addButton method
than the current one does. Its primary purpose is to reduce the
boilerplate code needed for add-on authors to implement a new button
alongside its hotkey.
Anki 2.0.x provided add-on authors with the ability to define
labels that could be used instead of icons. This commit reintroduces
that ability and makes the use of an icon optional.
remove the old forceClose hack in favour of a callback when closing, so
all windows have a chance to save properly before the collection is
unloaded
also:
- fix a warning shown when opening about screen
- require a call to editor.cleanup() when closing a window, to make sure
any pending js callbacks don't try to fire on a deleted object
- make sure we gc webview when closing editcurrent
- main.py still needs refactoring to make use of the change
- the bulk of image use is in webviews, so we move almost all used
images to web/imgs, as it's easier to manage
- change AnkiWebView to always use the local media server as a base, as
much of the UI has come to depend on it
- remove images from a few areas, as they felt dated
- delete a bunch of unused images
- href=# links were being opened in a browser window, so the code now
ignores them - the HTML should really be updated to return false in the
onclick handler
- update a few icons
this fixes a bug where navigating to the next/previous card using
shortcut keys resulted in the first field being clobbered
- get rid of the stealFocus option in favour of explicitly passing
focusTo to setNote()
- setFields() is no longer responsible for setting focus
- add focusTo var to the browser so that the row changed hook can
restore focus when navigating to next/previous card
- fix the row changed hook being called twice
- the blur event now includes the field number instead of relying on the
editor to have the correct currentField
- the current field is set to null on blur
- use deferred js and a callback rather than keeping track of when we
were loaded
- add shift+tab shortcut to go to previous field
- js code that was previously bundled in .py files is now in the
web folder
- add helpers to create links to bundled files, and update
stdHtml() to accept a list of javascript files to include
instead of text
- render MathJax in card layout and preview screens - these should be
updated in the future to update the document dynamically like the
reviewer does
- start media server earlier so it can be used to serve content for
the toolbar, etc
- work around a bug in WebEngine on Windows that could cause the
media server to hang
- add option to wrap html in implicit pre-wrap environment during
editing and review - defaults to off
- update paste filter to convert divs/Ps to newlines and non-breaking
spaces to normal ones
- catch enter key and write \n instead of creating a new div
also:
- remove extra caretToEnd() call that is no longer required
- add dd/dt/dl to allowed tags