Insert HTML wrapper for your style

AnkiWeb addon 1758039001

Wraps selected text in configurable HTML tags using a button or hotkeys, with a special command to completely remove tags.
AI-generated summary; may contain mistakes.

formattingshortcuts

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
2 (πŸ‘ 2 Β· πŸ‘Ž 0)
Updated
2026-02-16
Anki versions
25.09.2~
Description language
en

Maintenance

stale

  • Last update or commit was 227 days before the snapshot (2026-02-16).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.025.09.2+2026-02-16
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

This very simple addon doesn't even contain 200 lines of code and allows you to add one button with commands for wrapping selected text with your HTML code (you can change this in the configuration).

How to use it:

2026_02_15

Why is this necessary?

I'm not a fan of excessive formatting, as the text should be minimal and clear, and important words can be bolded or italicized, with less color. In each note template (CSS applies to all cards in a single note), the user can specify their own style for how they want important words to appear. This could be a specific color or a color that depends on the application's color theme. Specifying a fixed color would make it difficult for the user to read.

This add-on allows you to wrap your text in custom tags (here, 'w1' and so on) and then customize the CSS for these tags to suit your specific note type. Large and complex tags are not recommended, as they make the field's HTML code difficult to read.

The standard configuration file looks like this:

{
  "tags": [    
    "<w1>$$</w1>",
    "<w2>$$</w2>",
    "<w3>$$</w3>",
    "<w4>$$</w4>",
    "<w5>$$</w5>",
    "<w6>$$</w6>",
    "<w7>$$</w7>",
    "<w8>$$</w8>",
    "<w9>$$</w9>",
    "<w0>$$</w0>",
    "&nbsp; [Ctrl+Shift+Space]",
    "removeformatALL() [Ctrl+Shift+-]"
  ]
}

You can change the configuration as needed. The $$ sign separates the code into the beginning and end of the wrapper. If you don't specify a hotkey in square brackets after the final space, the default shortcuts are Ctrl+Shift+1, Ctrl+Shift+2, and Ctrl+Shift+0. The "removeformatALL()" command is special and is used to completely remove tags, as the standard tag removal doesn't remove all tags, and the Ctrl+Shift+V shortcut, which should do this, currently doesn't work in fields when editing.

HELP AND SUPPORT

Please do not use reviews for bug reports or support requests.<br> And be sure to like, as your support is always needed. Thank you. I don't get notified of your reviews, and properly troubleshooting an issue through them is nearly impossible. Instead, please either use the issue tracker (preferred), add-on, or just message me at andreykaiu@gmail.com. Constructive feedback and suggestions are always welcome!

VERSIONS

  • 1.0, date: 2026-02-15. First release.