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

AnkiWeb addon 754300509

Wraps selected card-editor text in code tags via a toolbar button or Ctrl+Alt+C, escaping special characters and converting line breaks for multiline code.
AI-generated summary; may contain mistakes.

formattingshortcuts

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
3 (👍 3 · 👎 0)
Updated
2025-05-25
Anki versions
unknown
License
MIT (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON, Ignore List
Description language
en

Maintenance

stale

  • Last update or commit: 2025-05-25 (525 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

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

Loading…

Similar addons

Insert HTML wrapper for your style

Wraps selected text in customizable HTML tags using a button or hotkeys, letting users style important words per note type through CSS.

formattingshortcuts

3 votes 44% approval 👍 3 · 👎 0 ⭐ 1 Anki 25.09.2~ Updated 2026-02-16
Wrapper meta-addon

Adds configurable editor buttons and keyboard shortcuts for wrapping/unwrapping text, navigating cloze deletions, inserting custom HTML, styling citations and mnemonics, and shuffling images or lists.

formattingshortcutscard-templatescloze

21 votes 55% approval 👍 16 · 👎 5 ⭐ 9 Anki 24.06.2~ Updated 2026-09-14
Just Mono v2 fork

Adds buttons and hotkeys that wrap selected text in monospace code or pre+code tags, with customizable shortcuts, for Anki 23.10 and later.

formattingshortcutsfork-or-reupload

2 votes 34% approval 👍 2 · 👎 0 Anki 23.10~ Updated 2024-01-06

Description

This add-on adds a toolbar button and a keyboard shortcut (Ctrl+Alt+C) to the card editor, making it easier to insert formatted code into flashcards. It wraps the currently selected text in <code> tags and also replaces line breaks with <br> for multiline formatting.

Features

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

If you find this add-on helpful, consider supporting its development here: sammed05.github.io/support

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 Ctrl+Alt+C 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.