39 5
Contact Author Sign in to rate

Closet For Anki

0.05MB. Updated 2022-08-12.
The author has shared 13 other item(s).


NOTE: If you are using Anki pre v2.1.36, only iOS, macOS, and Linux are supported currently, Windows is supported starting with Anki v2.1.36 and AnkiDroid is supported with 2.15 (which is currently in alpha) respectively. Closet is a unique mix between a templating engine and a markup language written in TypeScript for the generation of flashcards, especially for the use in the Anki flashcard software. It allows to use many “effects”, that you’d like to have on flashcards, like shuffling text items, clozes, multiple choice, or image occlusions. For more information, see first the introduction video and afterwards the website. Updates 2022-08-09: v0.6.1: - Additional support for Qt5 Anki (2.1.52+) and several bug fixes. Big thanks to kleinerpirat. 2022-07-15: v0.6.0: - Support for Qt6 Anki (2.1.52+). Big thanks to kleinerpirat who helped with this! 2020-04-12: v0.5.3: - Minor bugfix with style recipe 2020-04-11: v0.5.2: - Minor update: Add apply recipe as better alternative to simple recipe 2020-03-13: v0.5.1: - Introduce internals.template.(appendStyle/appendStyleAll/appendDocumentStyle) as preferred method to insert CSS documents 2020-03-12: v0.5.0 Closet CSS Update: BREAKING changes: - The library structure changed a little bit. If you had a custom setup, you might need to update it. If questions, don't hesitate to contact me. - Closet now is separated into both a JavaScript library, and a default CSS file. If you insert Closet with Asset Manager, the CSS import will be automatically added to the note type. You can also add it manually via putting @import url("__closet-0.5.0.css"); into your note type styling. This allows you to easily overwrite the default Closet styling with only CSS, which was a much asked feature. Big changes: - Closet now supports block tags. They're better suited for wrapping multiple lines with tags, then inline tags, as they will automatically "consume" the two linebreaks on the side. They look like this: [[#c0]] * Cloze going over * multiple lines [[/c0]] - Closet has a new algorithm to detect "meaningful content". This allows you to wrap a list (<ul> or <ol>) with tags, and Closet will mix the list items for you. There's no easy to show it currently, but more details will follow soon... Other changes: - The default setup now includes sort filters, which can be used for a kind of multiple choice question, (see here for more info) - The tag selector in the editor now adapts to dark mode (thanks to @kleinerpirat) 2020-12-22: v0.3.0 Christmas Update: BREAKING changes: - If you use Closet with Asset Manager, Closet will insert a new "Closet Setup" entry into it - Simply take the code from your old setup (which is now "loose"), paste it into the new entry - Afterwards you can delete your the old ("loose") entry - If you use Image Occlusion with Closet, you should be careful, when editing the occlusions: - Make sure that the field, which is supposed to contain the occlusions has a name which is suffixed with a 0, e.g. "Cmds0", or "Code 0" - First turn on the occlusion editor, so that the occlusions are visible on the image - Now delete the occlusions in the "Cmds0" field - Now accept the occlusions on the image: it should now insert the occlusions wrapped [#!occlusions ...your occlusions... #] General: - Support for Windows + AnkiDroid (starting with 2.15alpha17) - By default, Closet now automatically pastes occlusions into a zero-indexed field, if it exists, rather than copying to clipboard - This behavior can be changed in the add-on settings - As a beta-feature, Closet now hooks on the cloze shortcut (Ctrl+Shift+C and Ctrl+Alt+Shift+C) for clozes in a Closet-style - Add a select input in the toolbar, to configure what this shortcut outputs - The toolbar can be set with Ctrl+1, Ctrl+2, for different kinds of tags - The tag shortcuts respects the semantics of different tags (e.g. `[[c1::` cannot be on a field without a "Code 1" field, but `[[mix1::` can) Occlusions: - The occlusion editor will refuse to turn on, if the note type does not support Closet - You can set the max-height for images in the settings window (in percentage of the screen height) - Right-click on images, you can resize pictures in the editor - Trying to close the AddCards window with the occlusion editor open, will inform you to close it first - Turning on occlusion editor will highlight the icon in the menu - Make font size of labels dynamic to adjust to image size 2020-11-05: v0.2.3 has MathJax support in Anki - I improved on the previous approaches, and fixed some long-standing issues, that prevented full MathJax support 2020-11-03: v0.2.2 has experimental MathJax support in Anki - I removed most of the MathJax support, because it would lead to issues that hide the entire card from displaying in the reviewer 2020-11-02: v0.2.1 has experimental MathJax support in Anki - To enable it, you need to reinsert Closet using Asset Manager 2020-10-24: v0.2.0 brought some crucial changes with it, which try to make the Closet experience a better one. - Closet doesn't need Anki Persistence installed anymore - When opening the Asset Manager window, you will notice a script which says it's "loose". You can simply delete it. - Closet is now loaded asynchronously, which will increase the performance. Support If you like my add-ons, you can consider supporting me. My add-ons will always be freely available for everybody, but what I can offer you is my sincere thanks, and first-hand technical support, if you have any questions/issues with my add-ons. At the same time it allows me to put more time and focus into developing these and making them as powerful and user-friendly as they are. Thanks for considering! ko-fi.com/hgiesel patreon.com/hgiesel


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 1664340991
I use [[mc0::]] for mixing answer choices but how do I use make a list show in a randomized order and the back fixes the order?
on 1660725930
Gives error when adding a new card and pointing to this addon
on 1660647940
Thanks for fixing the error ""When loading 'Closet for Anki'.... ModuleNotFoundError: No module named 'PyQt6'".

Hopefully this good review balances out the bad one. I thought it's much more likely that bad reviews are read than good reviews. Might be a good idea to set up a github or something so people can post errors, especially since it looks like quite a few people are getting a lot out of this addon.

Thanks for the hard work!
on 1660518472
one of the best add-ons!!
on 1660144905
This add-on is really useful. I've been using for ages. Although it stopped working on qt5 and qt6 since yesterday, I'm not going to give a bad review just for that. The developer is already aware of the problem and is working to fix it.
Comment from author
Update: It works for both qt5 and qt6 now :)
on 1660093132
Been checking back for updates on this add on for the IO one by one note type. Today's update states it is compatible with 2.15+ but I still get an error
on 1659488110
Good addon but after updating to Anki 2.1.54 Qt5 (review heatmap addon doesn't work with Qt6), I keep getting an error when I run Anki
"When loading 'Closet for Anki'.... ModuleNotFoundError: No module named 'PyQt6'".
on 1655080468
Good addon, unfortunately it doesn't work on 2.1.50 and newer
on 1654988008
The red border does not show up when I am trying to create a IO One-By-One card on 2.1.49
on 1648876125
"This note type does not seem to support Closet. Closet needs to be inserted into the card templates using Asset Manager, or you can download a note type which already supports Closet."

Great idea!But how do I get the cards I can use?
I have tried all my card types and none of them work.
on 1646226675
apsolutely best
on 1645881586
The addon is very nice, but when we have an image which is long, then it shows up very small in the "block" field which makes it hard to work with. Would it be possible to change the height of the image (to make it bigger or remain the same as default copy paste image)? Thanks.
on 1645266264
Good. However, if I use an image which has a long height, it shows relativeley a small image in editing fields compared to the original. Even if I tried to change "Default max-height for images", it doesn't work.
on 1644537301
Great addin. Is the only way to accept occlusions via context right-click menu? If so, it would be nice if a hotkey could be set to accept image occlusions. THANKS!
on 1641136333
Not a developer, but I can still appreciate what an extensive job you did here. Is there somewhere a list, to see which add-ons implemented this add-on so far? I only know of the IO-one-by-one from AnKing.
on 1638714759
very useful, thx!
on 1631643841
Very innovative and thoughtful addon
on 1630814993
This add-on is a must-have for anyone looking to get the most out of Anki. Absolutely stellar job by the developer!
Comment from author
Thanks for the kind words :D
on 1628799757
Extremely useful addon! Great idea.
on 1627609154
Tell me how to install this addon on Android.
I'm on Anki 2.15.6
on 1627079582
Doesn't seem to work.
I watched the youtube video but can't set i up.

The author should post a clearer tutorial compatible with the newest version.

Edit: Sorry for my attitude!
I actually asked for help on the forum and Kleinerpirat kindly helped me.
Sometimes you end up complaining and blaming others instead of chasing what you want.

Thanks for your hard work.
Comment from author
True, however there's only so many hours in a day :) If you post on the support thread, I'm sure we'll be able to help you out.
Edit: Awesome! Thanks for the thumbs up!
on 1625149330
This addon is so extensive in what it can do it blows me away. It takes a while to learn it, but OP has put a youtube video out that helps that a ton. Pretty much anything you ever wanted to do with a card template can be done through this.
Comment from author before post was edited
Thanks a lot for your kind words, I appreciate it :)
on 1622618597
Really great. Useful for occlusions, for custom clozes, and even for general markup. I use this for:

Cloze Overlapping
Image Occlusion
Inline HTML Macros (Really useful)
Multiple Choice

This is an addon that needs to be known more.
on 1618683385
This addon is amazing! It is a wild, wild, extension of Anki functionality. I've been trying, slowly, to integrate it in my workflow since version 0.23 or so, and it does require a little work at the onset; but it seems that the developer is working hard on making it more user-friendly with each version. (I'm still unsure how to make it work in Ankidroid [2.15alpha43], though.)
Comment from author
If you're using the Ankidroid Alpha, Closet should work without any additions.
on 1618260163
Very complicated, but I can definitely see the benefits. I only have one issue so far:

I think that this addon interferes with the functioning of the edit field during review add-on. I can edit the field in the reviewer, but those edits aren't saved when I look at them in the browser.
Comment from author
There is no way Closet could ever work with "Edit field during Review", as it doesn't work with JS, and any kind of randomness. However that's what Closet is all about :)
on 1615339227
Truly amazing, especially if you know how to code at all. For everyone else, this should be the standard card type for pre-made decks.

Just needs an update so the image occlusion UI works with the latest anki.
on 1615076672
nice add-on!
on 1614221706
Download Anki 2.1.35 instead of 2.1.40, and the problem is solved!
Nice add-on! Have used it for a month. However, in the latest update (2021/02/25) there seems to be a problem in "occlusion": after I clip "accept the occlusion" and press command+v, nothing happens. The clipboard doesn't copy the information of the occlusion :((
Comment from author
Read the changelog from 2020-12-22: By default, occlusion are now copied into a zero-indexed field instead of to the clipboard. You can change this behavior in the add-on settings.
on 1612070043
This add-on single-handedly adds several of the most wished for features in Anki. It is extensible, works cross platform and has a ton of possibilities. The time you invest to learning to configure this add-on will be the most fruitful 60 mins of your anki journey. Kudos to the developer. Mind blown.
on 1611180774
Nice work!
on 1609703662
A couple questions:
- How can I do image occlusion to only cover one image at a time? I don't want all the images to be covered on the front of the card
- Is there a way in the style section to increase the font size of the cloze once it's revealed? I like doing this to help see it better
- Is there a way to generate multi-cloze cards without having to write "active" in all those cmds fields? Ideally I'd like to just generate multiple cards like how I can with the usual cloze cards

This addon would be perfect for me if I could fix some of this stuff
Comment from author
1. If your cards are properly set up, just putting "[[show::*]]" in field where the other occlusions are, but before the occlusions, should be enough.
2. Certainly possible, but would require a custom setup.
3. Writing "active" should not necessary, once you update to Anki 2.1.36. It overwrites the built-in cloze command, which also writes "active" into the cmd fields.

P.S. you can also reach me on GitHub, or on the Anki Forum, which are platforms better suited for this kind of dialog.
on 1608922475
Probably useful but too complicated for me now (and besides that I'm on Anki 2.1.22)
on 1606894754
Can support Version 2.1.26?
Comment from author
I'm afraid not. iOS, macOS, and Linux are supported currently, Windows and Android will follow with Anki v2.1.36 and AnkiDriod 2.15 respectively.
on 1606444831
Amazing work! The potential for Closet is huge - and the author's support is top notch. Can we take a moment to appreciate how all of this guy's addons are free for everyone?
on 1606409324
Excellent, but it doesn't work on ankidroid, what can it be?
Comment from author
It's a known issue, however we're working on it. Support should come with the next AnkiDroid version (2.15). https://github.com/ankidroid/Anki-Android/pull/7764
on 1605606264
Awesome!!! Keep going with this wonderful addon!
Comment from author
I will :D
on 1605482107
Incredibly useful add-on. Incremental reveal, reveal/hidden occlusions and integrated image occlusions are absolute game changers.

If you eventually make a tutorial on setting up the toggle button for 'recth' occlusions, that'd be the cherry on top of this sundae of an add-on.
Comment from author
Yes, that's kind of a "hidden" superpower of Closet. If I make a tutorial it's probably gonna be somewhat developer-oriented, because you gotta know some HTML / JavaScript to understand what's happening.
on 1602451146
on 1601863898
Something might be broken in latest updates. Don't know what but it's not working properly.
Comment from author
Could you elaborate what's not working? You don't give me much to work with here... Please refer to the "Contact Author" button for bug reports.
on 1601818423
Looks amazing but there's a conflict with another add-on I use. I wanted to use this to add Clozed effect to my Japanese production cards but [] brackets are used by the Japanese support add-on to put Furigana over words. when i try to add the closed effect anki thinks it furigana and doesn't add the effect.
If it possible can i change it to use different brackets like {} or <>.
Comment from author
For anybody interested in this as well, here's the discussion thread: https://github.com/hgiesel/closet/issues/27
on 1601781645
on 1600287851
What an Addon!!!!
Loved it,
-----Incremental Reveal ----- OMG life saver
So much potential in this addon!!
Great Work!!!
on 1600254360
Great add-on! Thanks
on 1599554458
This is the best add-on for Anki!!, congrats to the developer for such a great piece of art :)