AnkiWeb
- Rating
- 2 (π 2 Β· π 0)
- Updated
- 2026-09-14
- Anki versions
- 23.12~
- Description language
- en
AnkiWeb addon 465508076
Removes inline style blocks from selected note fields, deduplicates CSS into a media file, and inserts an import to reduce collection size.
Open on AnkiWeb GitHub Ask about alternatives
active
| Min Anki | Max Anki | Updated |
|---|---|---|
| 23.12 | + | 2026-09-14 |
Loadingβ¦
Safely scans and consolidates byte-identical media in Anki's collection via dry runs, updating note references and trashing redundant copies through official APIs.
Opens field content in a TinyMCE-based dialog editor for advanced table editing, styling, merging cells, and borders, accessible via a TM button or configurable shortcut.
Adds archived Markdown and KaTeX card types with colored cloze, code block support, dark mode, and customizable styles.
Backfills Anki fields, media, and audio from Yomitan's API for selected decks or cards, with presets, configurable handlebars, and undo support.
Provides CSS-only night-mode syntax highlighting for code in Anki, requiring template import setup and manual CSS Injector modification for Anki 2.1.50β2.1.54.
Creates highlighted code blocks and inline code from selected text or clipboard, working in day and night modes on Anki desktop and AnkiDroid.
Remove inline <style>β¦</style> blocks from selected note fields and move the CSS
into collection.media/_extracted_css.css, with selector-level deduplication.
This is useful when large HTML fields (e.g., Yomitan/JP mining glossaries)
embed repeated CSS, bloating collection.anki2 and pushing you over AnkiWeb
size limits.
<style>β¦</style> blocks from configured fieldscollection.media/_extracted_css.css<style>@import ...</style> into the field to load the CSSstyle="..." attributes into CSS classesdata:image/...;base64,... image sources to media filesOption A β AnkiWeb code:
465508076Option B β GitHub Release:
inline-css-cleanup.ankiaddon from the latest
GitHub Release.ankiaddon file and restart AnkiOption C β Build from source:
./package.sh to build inline-css-cleanup.ankiaddon.ankiaddon file and restart AnkiGitHub Actions builds the add-on on pull requests, pushes to main, manual
runs, and tags matching v*.
To publish a release:
v0.2.0dist/inline-css-cleanup.ankiaddonTo fix duplicate media references created by old Yomitan versions, use the same
deck, note type, and field selectors, then click Fix Yomitan Media Refs. This
uses Anki's media database checksums to point yomitan_dictionary_media_* and
yomitan_audio_* references at an existing same-content file. It does not create,
delete, move, or scan media files.
Use Save Defaults to persist the current deck, note type, field, and cleanup options to the add-on config.

See config.md for detailed configuration.
Quick defaults (from config.json):
{
"decks": [],
"note_types": ["Lapis"],
"fields": ["Glossary", "MainDefinition"],
"fields_by_note_type": {
"Lapis": ["Glossary", "MainDefinition"]
},
"confirm_before_run": true,
"extract_inline_styles": false,
"extract_data_image_sources": false,
"inline_style_min_length": 80,
"inline_style_min_ratio": 0.05
}
!important to better preserve appearance.hoshi_dict_<sha1>.<ext> media files,
matching Hoshi Reader's AnkiConnect dictionary media naming.collection.media/_extracted_css.css and also mirrored to user_files/extracted_css.css (easier to find).AGPL-3.0-or-later