AnkiWeb
- Rating
- 13 (π 11 Β· π 2)
- Updated
- 2021-08-10
- Anki versions
- 2.1.46~
- Description language
- en
AnkiWeb addon 1187194862
Adds four buttons for strike-through text, horizontal ruler, code block, and paragraph, restoring formatting features absent from the 2.1.45 update.
Open on AnkiWeb GitHub Ask about alternatives
abandoned
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.45 | 2.1.46+ | 2021-08-10 |
Loadingβ¦
Provides Anki text formatting buttons for highlight, inline code, code blocks, horizontal lines, lists, indentation, and alignment, configurable through Anki's config manager.
Supplementary formatting tool that wraps selected text in a custom pre block and adds inline code, kbd, removal buttons, and single-character Pinyin support.
Creates unordered lists whose items shuffle randomly on the front side each review, using a toolbar button or Ctrl+Shift+U and circle bullets.
Adds an option in the browser editor that lets you strike through text.
Provides keyboard shortcuts to highlight text in configurable colors, with optional bolding via config.json, using Ctrl+Alt plus a color's first letter (bracketed exceptions).
Adds a + button to the card editor toolbar for inserting custom buttons that place content at the cursor or around selected text, with custom shortcuts and dark-mode support.
Adds four buttons:
You'll need node and yarn installed.
tools/build.sh. This makes a release build, so console.log lines are stripped out./ts, and running yarn run dev. This ensures
that any changes you make in /ts are immediately compiled to /dist/web.bin/zip.sh. Will be put into zipped/. This file can be uploaded to Ankiweb.Built output will be put into dist/. This directory can be linked into your Anki add-on folder,
e.g.
ln -sf "$(pwd)/dist" ~/Library/Application\ Support/Anki2/addons21/myaddon
Alternatively, you can also use the anki submodule for development.
Advantages include:
Disadvantages include:
anki/ section below before
proceeding.If you decide to use the anki submodule, you can run it with tools/run.sh or
tools/dev.sh, which combines /anki/tools/ts-run + /anki/tools/ts-watch + yarn run dev
(Might be fuzzy and make unnecessary compilations).
dist/Contains the compiled output of python and typescript.
ts/Contains the Typescript and Svelte files which are used for Anki webviews.
anki/A submodule pointing to ankitects/anki.
This can be used for running the add-on or for (very) limited typechecking/IDE support, as this area is still a work in progress. To set up:
cd anki && git submodule update
Read the anki/docs/development.md file, and ensure you have the necessary dependencies (particularly Bazel). Then build the ts portions of Anki, which will take some time:
bazel build ts/...
If the build completes successfully, you can then open the ../ts folder with VSCode.
Only a few explicit types can be imported at the moment. For example, this line imports an object at runtime, and is not typed, and will show an error in the editor (but will build):
import * as NoteEditor from "anki/NoteEditor";
This line imports a type however:
import type { NoteEditorAPI } from "@anki/editor/NoteEditor.svelte";
You can then tell the editor that a variable is that type, to be able to get code completion on it:
NoteEditor.lifecycle.onMount(({ toolbar }: NoteEditorAPI): void => {
toolbar.inlineButtons.append({ component: StrikeThrough }, 2);
});
Typing "toolbar." will show the various available toolbar categories.
ankidata/This directory is only relevant if you decide to develop with the Anki submodule.
When invoking Anki through tools/run, it will be started with $ANKI_BASE pointing to this directory.
This means that all data related to profiles, collections, and decks will be saved here.
ankidata/addons21/distA symlink pointing to dist/.