10 0
Contact Author Sign in to rate

CSS Injector - Change default editor styles

<10kB. Updated 2022-05-28.
The author has shared 9 other item(s).


Allows you to override the default styling of lists, links, etc. within Anki's fields, as well as the overall look of the editor. How to use it: Selectable attributes: ChangelogMade by Matthias Metelka | @kleinerpirat Thanks to Hikaru Y. for his amazing contribution to this add-on, and to ijgnd, Thomas Kahn and shallash, for their great suggestions and continued testing! - inspired by Henrik Giesel: https://forums.ankiweb.net/t/access-to-dom-element-in-editorfield/8782/8


As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:


If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author


on 1670230551
Great. Thank you. I use it to limit the image size shown in the editor:

In fields.css, add

anki-editable img {max-height: 100px}
on 1660876854
on 1658390031
Would be nice to be able to also inject css (and js?) in other views, such as Overview and DeckBrowser etc.
on 1653414072
on 1652863129
thanks! very need for it
on 1650496877
Well, what can I say, this thing works.
on 1633730702
very useful
on 1633517457
Very cool!

Suggestion: It would be great if it was possible to apply certain attributes only if nightmode is enabled. I know that during review all elements get an additional "nightMode"-class applied to them. Maybe something similar could be done here?

Update: Thanks a lot, this is great! 😍
Comment from author before post was edited
Thanks for the suggestion! Night mode scoped styling via .nightMode class is now possible.
on 1620903566
This is awesome!!! Would it be possible to expand this to be able to edit also editable.css and deckbrowser.css ?? Until now i edited editor, editable and deckbrowser manually from aqt_data folder but this way i have to do it all again every time i update anki
on 1620759297
Exactly what I was looking for, thanks to the author !