HTML Editor Tweaks v0.2

AnkiWeb addon 410936778

Tweaks the built-in HTML editor by prettifying HTML with Beautiful Soup, remapping a shortcut, setting a monospace font, resizing the editor, and disabling last-line cursor loading.
AI-generated summary; may contain mistakes.

formattingshortcutsappearancebeta

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
8 (πŸ‘ 6 Β· πŸ‘Ž 2)
Updated
2020-03-22
Anki versions
2.1.24~
Description language
en

Maintenance

abandoned

  • Last update or commit was 2098 days before the snapshot (2021-01-02).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.222.1.24+2020-03-22
History across monthly snapshots

Loading…

Similar addons

README

Clickable Tags

A stripped-down port of the Clickable Tags add-on to Anki 2.1.

Just add the {{Tags}} special field to your card template. The add-on will take care of the rest.

Single-click the tag to search for notes with that tag. Double-click to limit the search to the current deck.

Clickable Tags

HTML Editor Tweaks

A set of tweaks to the built-in HTML editor. Hopefully an improvement for those who spend a lot of time editing cards.

Very alpha. Seems to work 99% of the time, but please make a backup of your collection first.

Tweaks

  • Prettifies the HTML by running it through Beautiful Soup
    • Reformats pretty aggressively, which is what I wanted, but not everyone will like it
  • Remaps <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>X</kbd> to <kbd>F12</kbd>
  • Sets a decent monospace font (assumes Iosevka; edit __init__.py to change)
  • Resizes the editor to something more reasonable than 400 x 300
  • Disables the default behaviour of loading the cursor on the last line (personal preference, yes)

HTML Editor Tweaks

Known Issues

  • Adds spurious space just before <sub> or <sup>
  • Incorrect handling of tags inside parentheses

Web View Styling

Show Cloze Length

  1. Clone or modify a Cloze note type.
  2. Add a Term field to the note, containing the text that is hidden by the cloze.
  3. Copy _showClozeLength.js into your collection.media directory.
  4. Add this to the note styling:
.hidden { color: transparent; }
  1. Add this to the front of the cloze card, at the bottom:
<div class="term hidden">{{Term}}</div>
<script src="_showClozeLength.js"></script>