Hello, for any reason the beautiful icons don’t show up for me. I don’t see the wand and the audio or anything else in Anki… they also don’t show up on the demo site.
I am wondering if this is a general issue?
Edit: I found the issue in this thread. I now found the hint icon. Can you provide the path for the audio icon as well?
You are on iOS, I presume?
The audio buttons are a little different from the hint one, since they are not hardcoded into the template itself and are generated by Anki on the fly. Their appearance should be modifyed with JavaScript instead directly pasting the shape attribute into the template. If you want to change the triangle play button into the Memrise speaker icon, put this into user script section on the front side of each card type:
Hi, I need help customizing the audio playback duration in Anki. Here’s my situation:
I use ABSPlayer to add audio for entire example sentences (not individual words). On the front side of my cards, When I answer correctly, Anki automatically plays the sentence’s audio but cuts it off halfway for longer sentences. I want to ensure the full audio plays completely before Anki proceeds to autograde the card.
Could you guide me on how to set a custom delay or force Anki to wait for the full audio duration before moving forward? I’d greatly appreciate your support!
To set the custom delay just put the following code into the user scripts section on your cards:
flipDelay = 5;
where 5 can be replaced by any number, that would define the duration of the delay in seconds.
Unfortunately, there is no way to make the delay auto-tunable to fit the variable duration of audio files (because of how audio playback is handled in Anki), but there are some additional options for customizing the playback you might find useful, which are outlined in this post:
I’m still encountering some issues while using the Memrise template on Anki, and I haven’t been able to find a solution on my own or in the forum. I’d really appreciate your help:
I would like the template to show me new words or sentences before practicing them, similar to how it worked in Memrise. Is there a way to achieve the same functionality in Anki?
Regarding the typing translation cards, where can I find a character display that contains the words I am supposed to type in, especially those with umlauts? I don’t want to rely on my keyboard. This feature was available in an earlier template, so I hope you understand what I’m referring to.
For the algorithm: If I create a filtered deck or set my daily limit to, let’s say, 80 words, how can I ensure that during my study session, all four card types for each word appear randomly? I want to study 20 words, with each having four card types, making a total of 80 cards. However, when I tweak my settings, I either get the card types in order for one word or different card types for different words.
If I want to study grammar the way it was in the old Memrise, how can I set it up so that I don’t have to type in the entire sentence? Instead, I would like to be given individual words and arrange them in the correct grammatical order.
I hope this isn’t too much to ask. Thanks in advance!
Failing a card when you see it for the first time has no drawbacks in Anki, so the simplest way would be to do just that – this will flip to the same info screen you are supposed to see for new cards on Memrise. If you are on desktop, this can be done automatically, but requires installing some addon, like this one, to make information about the state of the card available for the template. If you are interested, I can probably scribble the sample script for you. This might also be possible on AnkiDroid, but likely not on other platforms.
Tbh, I’m not sure what you are referring to here. If by words you mean letters, you might be looking to set up the on-screen keyboard as described in this post:
Setting “New card sort order” to “Random note, then card type” in the deck settings might be what you are looking for. But I’m not sure the option applies to filtered decks since I don’t use the feature myself. You might want to ask this question in a separate thread, where other people helping on the forum have better chances of seeing it.
Tapping cards have been requested a couple of times in this thread (I have your previous request for this feature logged as well), so I’m keeping it in mind for future updates. The next one however will focus on cloze cards (enabling multiple-choice questions and other functionality from the latest versions), as well as full template support for AnkiWeb (reviewing cards in a web browser). It is practically ready but still requires some final tweaks which I won’t get a chance to work on for several more weeks.
First of all, I want to sincerely thank you for sharing your amazing Cloze template. I came across your comment where you provided it to someone else, and after trying it out, I was truly impressed by how well it works. It has been incredibly helpful for my learning, and I deeply appreciate your effort in making it available to others.
I was wondering if you could help me customize it a little further. I’d love to add a function similar to what Quizlet does—where, if I type the answer incorrectly, the card allows me to try again a few times while briefly showing the correct answer. I believe this would make the learning process even more effective.
If it’s possible for you to help, I would be so grateful! Here is the template I’m using: Drive
Thank you so much for your time and generosity in sharing your work. I really appreciate any help you can provide.
Thank you for the kind words, I’m glad you like the template.
First of all, you will have to update to the newer version of the template, which is available for cloze cards here. Although that is a not finished version, which is why it wasn’t posted here yet, the cloze-related functionality should be working in that one as is. The important thing is that the new version handles typed input independently instead of relying on Anki functionality (as the version you are using does), which should make it possible to introduce the modifications you want.
Being a yet unreleased version, however, it requires you to assemble it from the provided parts yourself. The general steps are the following:
Rename “Text” field in your Note Type to “Sentence” (this is the name the new code expects)
Remove all code from the front side in your template and assemble the new version by pasting the following pieces in order:
Contents of “Template Cloze Front.html” file (available via the link above)
Separating text (it will be important for future updates):
<!-- -------------------⚙️ user prior scripts ⚙️------------------ -->
<script>
//place your scripts here
</script>
<!-- --------------------- template scripts --------------------- -->
Contents of the “Template Front scripts.js” file
Ending separator:
<!-- --------------------- user posterior scripts --------------------- -->
<script>
//place your scripts here
</script>
The new cloze template generates both multiple-choice and type-in cards, starting from the former. If you are only interested in typing questions and don’t need the multiple-choice ones, find and delete the following part in the assembled front-side code:
Similarly assemble the back side from the contents of the “Template Cloze Back.html” and “Template Back scripts.js” files with the same two separators. You might want to copy the customized part of the code related to extra fields from your current template and put it back in the same location after assembling all the pieces
Remove all code from the Styling tab in your template and replace it with the contents of the “Template Styling.css” file
This should give you a working updated version of the cloze template. In order to modify the answer submitting function the way you want, put the following code inside the “user posterior scripts” section on the front side of the card:
document.onkeydown = function (e) {
var ev = window.event || e;
if (ev.key === 'Enter' && (tabSelected !== document.activeElement || tabSelected?.id === 'typeans')) {
//last action was NOT selecting element with Tab -> Enter=flip (prevent audio activation)
if (document.activeElement.matches('a.replay-button.soundLink')) {
document.activeElement.blur();
}
if (!isFrontSide) {
if (flipBtn && flipBtn.onclick) {
flipBtn.onclick();
}
} else {
typeHint();
}
}
if (!isFrontSide && ev.code === 'Space') {
if (wrap.classList.contains("backside")) {
return;
}
e.preventDefault();
MemFlip(true);
}
if (isFrontSide && "1234567890".includes(ev.key) && isMCh) {
let numkey = parseInt(ev.key);
if (numkey == 0) {numkey = 10};
const mchoiceButtons = screenKeyboard.querySelectorAll('.membtn');
if (numkey <= mchoiceButtons.length) {
mchoiceButtons[numkey - 1].onclick();
}
}
if (!isFrontSide && "1234".includes(ev.key)) {
try {
pycmd('ease' + ev.key);
} catch(err) {}
}
}
If you are using the support add-on (if not, you’ll need to install it and restart Anki), the provided script will change the behavior of submitting a typed answer by pressing Enter. The correct answers should continue to function as before, while incorrect answers will be truncated to the latest correct letter and an additional letter will be revealed, the card will continue to show the front side waiting for your next attempt.
Please feel free to ask further questions if you encounter any difficulties following the above steps.
Now formatted alternatives (marked by part="alt") are properly displayed in the editor with a dedicated style (multiple alternatives can be put together with | used for separation – each will be considered a valid answer when the field is tested on):
The second tool cleans all alternative answer formatting from the active field (contents of the alternative answer section are preserved and merged back into the main part):
There are also keyboard shortcuts for both tools: Alt+A and Alt+X respectively
The alternatives are now discarded when the “Fill choices” function is used to generate lists of potential answers for multiple-choice cards
Note, that Memrise’s hidden alternatives functionality can be reproduced by adding the off class to an alternative section:
A hidden alternative will be displayed in the editor normally while being automatically hidden during reviews. Alternatives from this section will still be accepted as valid answers when the field is tested on. One potential use is accounting for variations in spellings of a word. A field can have both, a normal alternative section and hidden alternatives.
(This feature does not have a UI button but can be implemented if requested)
It focuses on making all the features of the template fully functional when studying Cards directly on Ankiweb from a web browser, adds tapping input for the Cards and the long-requestedcloze deletion version of the template, as well as makes a series of quality-of-life improvements.
1. Tapping input
An input method from the original Memrise site, convenient for practicing grammar and composition of entire sentences, requested by@wodwocrowand@butter_muffin:
Breaking of a sentence into parts can be controlled by interchanging between a normal space character and a non-breaking space (entered as in the sentence field’s HTML):
Tapping using keyboard number keys is supported (and activated once any of them is pressed, like on Memrise). Everything mentioned works with LaTeX answers (with the result being rendered as a complete equation):
The layout is also adjusted to avoid the visual bug from Memrise, where the button row jumps 2px down on first input. Also, all buttons look pressed while being clicked:
The shared Deck provides two separate presets: Memrise (Lτ) Preset [Translation+Listenting | MultipleChoice+Typing] v5.0 generating typing and multiple-choice Cards for each note (better suited for studying individual words) and Memrise (Lτ) Preset [Translation+Listenting | Tapping+Typing] v5.0 for typing and tapping (better suited for whole sentences). This, of course, can be adjusted to generate all three Types of Cards for each Note / individually control the number and Types of Cards based on flags (e.g. to account for a Learnable being a word or a sentence within the same Note Type) and/or dynamically change the input method of any Card (feel free to ask for detailed instructions in this thread).
Note that there was a slight change in the way the Card input methods are specified in the code. To support the choice of tapping and make it easier to introduce new methods in the future, a universal "mode" attribute is added to the card container element. Now the input mode is selected by defining mode="typing", mode="mchoice", or mode="tapping" for type-in, multiple-choice, and tapping Cards, respectively, instead of using mch in the list of classes (when no mode is set explicitly, the template reverts to the old way, so it is should be backward-compatible with HTML layouts made for the previous versions of the template). Also, the nkeys class needs to be added for multiple-choice Cards to keep button numbers being displayed from the start (otherwise, they will only appear after a first press of a number key, like for the tapping input).
2. Cloze template
While there was a cloze version of this template originally requested by @khong and published a while back, it wasn’t yet updated to include all the features introduced in the main template since then (such as multiple-choice input, spelling diffs, etc.). Now that the template is rewritten in a way which makes all scripts auto-adjust depending on which Note Type they are inserted into, supporting the cloze version to satisfy themultiplerequests (by @butter_muffin, @HQYang, and@Vanquoc) became easy enough. So this (and all future versions of the) shared Deck will include a version of the template for cloze Cards:
Keep in mind that in Anki, cloze deletion tests are a whole separate breed of Note Types, which use different rules to generate Cards (based on the number of clozes instead of a predefined set of Card Types, as is the case with the regular Note Types). Cloze and regular Note Types cannot be easily converted or mixed with each other. This doesn’t mean that any of the features of the main template cannot be activated in the cloze version. While the cloze Note Type included in the shared Deck (Memrise (Lτ) Cloze Template v5.0) is set up to produce only typing and multiple-choice Cards (the former for clozes with even ordinal numbers and the latter for the odd ones), these setup can be adjusted to generate Tapping Cards along the other two input methods.
A couple of usage tips:
In the default setup, to make both multiple-choice and typing Cards from the same part of text, it should be clozed twice using sequential numbers, like this:
...outside text {{c1::{{c2::clozed part}}}} outside text...
Hints/placeholders/synonyms can be added to any of the clozes to indicate what kind of answer is expected:
While serving as a central hub for the whole Anki ecosystem and connecting apps on every other platform together, AnkiWeb itself does not provide much in terms of reviewing Cards. Even basic functionality, such as typing answers available in stock Anki Note Types, does not work when reviewing the same Cards in a web browser.
This update completely fixes this issue, making all the features function universally, not only across all Anki apps, but in AnkiWeb as well: typing Cards accept typed answers, autorate them, and provide spelling differences, if there are any; multiple-choice Cards (including images and LaTeX equations) work as expected; audiobuttons have their normal looks and animations (instead of appearing as <audio> tags, which is the default on AnkiWeb)[1]; all keyboard shortcuts (1-0 for for answering cards, 1-4 for manually rating answers, Space for revealing the info screen, Tab and Enter for selecting and playing back audio) function the same way they do in the desktop app; on-screen keyboard, Hint button, etc… everything works[2]:
When reviewing Cards made with this template, the AnkiWeb interface is also adjusted, conforming to the overall aesthetic (the show answer button functioning as the [>] Next / [?] I don't know / [>] Check Answer button from Memrise):
The rate buttons on the back of a Card highlight the automatically pre-selected rating for the answer (which can be confirmed by pressing Enter or overruled by manually pressing any other rate button):
As opposed to using any Anki app, reviewing from AnkiWeb does not require downloading your collection locally, which might be beneficial for mobile devices, as it allows saving some storage. It can also serve as a way to review the cards on an iPhone without Anki iOS app restrictions, such as unavailable automatic rating and multiple-choice autosubmit functions. On the other hand, however, each card will have to be loaded on the fly, meaning it will require constant connection and, for Cards with a lot of media (like multiple-choice cards with a large number of potential image choices), can take some extra time during reviews if the internet is not fast enough.
4. Audio
There have been several improvements to audio buttons (to make them work on the AnkiWeb website and also as a step towards multiple-choice Cards with audio options, which is another long-requested feature). The updates include:
Support for audio files not included in the Anki collection
as opposed to the default way of adding them to the Anki collection and referencing as [sound:%audio_file%], should become functional and have the exact same buttons and animations. This might be helpful for files, which are too large to be used with free Anki cloud storage, or to save on the size of the account’s collection in general. This way has a couple caveats, however: the audio will look different when editing a Card (and might be a little less convenient to copy and paste, but more convenient to playback), and there is the obvious risk of losing the audio in a Card if the resource it is liked to changes URL or deletes the file. External audio might also take more time to load in each review if the internet is slow. This will be indicated by a new loading style for audio buttons:
Previously, if a Card had multiple audio files, all of them were autoplaying in the beginning (and after answer submission), while the manual replay using the button on the front side always replayed only the first audio. Now, following the functionality of the original Memrise audio questions, the playback is randomized: a single random audio is autoplayed when a Card is revealed or flipped, and repeatedly pressing the front button will always replay the same randomly-selected file (the backside still includes all buttons for each of the audio files in the Card, so that they can be replayed manually).
In case a default Anki autoplay interferes with the random autoplay invoked by the template scripts (a portion of a separate audio might be heard before the randomized autoplay kicks in, which is more noticable on mobile devices), disabling autoplay in deck options is the way to solve it (turning deck audio autoplay off will not prevent the template from autoplaying a random audio).
The style for displaying audio buttons on the backside is improved to account for Cards with very large numbers of buttons.
5. Cooldown
As discussed with @mthierst, this update adds a small cooldown after automatic Card flips, to prevent accidental submission of empty answers (the exact delay can be adjusted in the code).
6. Add-on updates
After the alt-formatting functionality was introduced to the support addon, there have been a couple of minor Anki updates that interfered with that format attributes. Even though these changes are reverted now, and you should not notice any differences if you didn’t install versions 25.02.1 and 25.02.2 of Anki (updating straight to 25.02.4 and onwards should be fine), to reduce the likelihood of any similar breakages in the future, the Add-on is modified to use class="alt" as the means to mark alternative answers. If you have the Add-on installed, you should have received the update automatically. The Card template itself continues to support both the old and the new formatting, so this only makes a difference when manually editing a Field’s HTML code and should serve as a replacement for the original instruction included in the feature’s initial release.
Formatting is slightly adjusted to insert a space between the main value and the alt when displayed in the Anki search table
Redundant newlines, sometimes inserted by the Anki Editor at the end of a Field when formatting alts using Add-on buttons, are now automatically cleaned up.
There is now a warning when trying to execute the Fill Choices function on a single Card.
7. Other
Fields containing HTML formatting are now better cleaned up when used in typing and tapping questions
The Hint button is now properly centered when the on-screen keyboard has no other keys
A bug that caused some LaTeX alts not to be accepted as correct answers is fixed
Note that the HTML id for the element, showing the differences between the typed answer and the expected answer (“You wrote: …”), is changed from “spellcheck” to “spelldiff”, to avoid confusion with an unrelated HTML input attribute, and when referring to it in template discussions. This might be important to keep in mind when updating to the new version via copy-pasting the customized HTML section, or when transferring custom styles for this element
The shared deck with v5.0 templates and presets can be downloaded here (AnkiWeb page and the releases section will be updated shortly):
If an audio Card is the first Card opened when a Deck review is initiated, the audio won’t immediately autoplay after loading. It will play back only after the Card is interacted with in some way: clicked in any place or anything is typed into the input field. This happens because of web browsers’ default autoplay policy intended to minimize the impact of unwanted ads on websites. The same holds for linked audio from external sources when reviewing in Anki apps. The autoplay policy settings can be changed in the web browser settings.↩︎
tested in Chrome and Firefox on desktop (Windows), as well as in the mobile version of Chrome on Android and Safari on an iPhone↩︎
I’ll download this and give it a spin when I find a moment - but in the meantime, let me thank you for the on-going development and support for this, much appreciated!
Hello! I’m having a bit of trouble with the Multiple Choice Questions type. When I click on an answer, the result appears very quickly, and I don’t have enough time to select the other correct answers. Do you have a way to change it so that I can choose multiple answers first, then press the Enter key to show the result? Thank you very much!
This template is designed to make the Memrise kind of multiple-choice tests, which always expect a single correct choice, with the answers being submitted as soon as any of the buttons is clicked (there is additional functionality for alternative answers, but it still accepts any single one of the correct choices as a right answer).
Of course, one still could change the template to work with sets of choices instead of a single choice, but that is not a small change, and would require modifying all the scripts for how the choices in the test randomized, how the buttons are pressed, how the answer is stored and retrieved, and how its correctness is evaluated.
Hello, dear, one question: Is it possible to select more than one option in the multiple-choice option type? I mean, if this is planned to be implemented within the template, hidden checkboxes could be used.