Code Wrapper - wrap text in `code` tags with a button and shortcut

AnkiWeb addon 754300509

Adds a toolbar button and Ctrl+Alt+C shortcut to wrap selected card-editor text in code tags, escaping special characters and converting newlines to line breaks.
AI-generated summary; may contain mistakes.

formattingshortcuts

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
3 (πŸ‘ 3 Β· πŸ‘Ž 0)
Updated
2025-05-25
Anki versions
unknown
Description language
en

Maintenance

stale

  • Last update or commit was 494 days before the snapshot (2025-05-25).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.0–2025-05-25
History across monthly snapshots

Loading…

Similar addons

Just Mono v2

Wraps selected text in monospace code or pre+code tags using buttons or hotkeys, supporting Anki 23.10+, with configurable shortcuts.

formattingshortcutsfork-or-reupload

Rating 2 πŸ‘ 2 Β· πŸ‘Ž 0 ⭐ 0 Anki 23.10~ Updated 2024-01-06

README

Code Wrapper for Anki

Code Wrapper is a simple Anki add-on that adds a toolbar button and keyboard shortcut (Ctrl+Alt+C) to the card editor. It wraps the selected text in <code> tags and replaces newlines with <br>, making it easier to add formatted code to flashcards.

Code is licensed under the MIT License.

Features

  • Adds a <> button to the editor toolbar;
  • Use <kbd>Ctrl+Alt+C</kbd> as a shortcut for quick formatting;
  • Automatically escapes special characters and preserves whitespace and line breaks.

Installation

You can install the add-on from AnkiWeb (search for "Code Wrapper") or manually by placing it in your addons21 folder (located in %APPDATA%\Anki2\addons21 on Windows, ~/Library/Application Support/Anki2/addons21 on macOS, or ~/.local/share/Anki2/addons21 on Linux).

Support

If you have issues or suggestions, feel free to open an issue or pull request.