TRIAEIOU / markdown-input

Anki addon to allow note editing in markdown, either in the Anki windows or external dialog.
MIT License
18 stars 2 forks source link
anki anki-addon

Markdown input

Anki (GitHub) addon (GitHub) that allows adding and editing notes in extended CommonMark Markdown, either directly in the editor fields ("field input mode", similar to the core rich and plain text edit interface) or by opening a separate window to edit a specific field or the entire note ("window input mode").

Markdown input

First use

Anki version note (2.1.56+)

The editor DOM and internal functioning which Markdown input depends on changed in Anki version 2.1.56. The current version of Markdown input ships with both 2.1.56+ compatible code as well as the last release targeted at 2.1.55. Going forward no updates/fixes will be made to the legacy code, any development/bug fixes will be in the 2.1.56+ code.

Warning

HTML ↔ Markdown

Conversion to/from HTML is done through unified Markdown functions hast-util-from/to-html hast-util-to-mdast/mdast-util-to-hast and mdast-util-to/from-markdown which are CommonMark compliant. The following changes/extensions has been made in the addon:

Editor

The editor used is CodeMirror 6 with the following configurations:

Field input mode

Window input mode

Configuration

Suggested companion addons

To achieve a note editing friendly interface consider using:

Developers

Functionality split into different classes to facilitate reuse:

Changelog