Just like the description, how can i achieve this, thanks a lot
I already know how to create multi cloze deletions with same cloze number, what I don’t know is when I review the card, how can I toggle the answer of the clozed content before hit the rate button.
You can also elide multiple sections on the same card. In the above example, if you change c2 to c1, only one card would be created, with both Canberra and 1913 hidden. If you hold down Alt (Option on a Mac) while creating a cloze, Anki will automatically use the same number instead of incrementing it.
Like other users, I vaguely understand what you want.
Try the following add-ons:
1990296174
1784155610
838763277
The forum does not allow me to leave a full link. Perhaps because I recently registered (it’s strange because these are links to internal resources ANKI)
Thanks, I will try this addons, I guess they all create their own note types to realize the functionality, I wonder if I can do similar thing using the standard built-in ‘Cloze’ note type.
I’ve tried the 1990296174 addon, it has the ability to relveal all clozes at once while reviewing, but I think it’s heavy for me to use an addon for a function like this.
I still don’t know how to reveal/hide all clozes when I’m reviewing the card using just the built-in ‘Cloze’ note type.
This is another slightly more complex version of the script, which works better in case you ever use placeholders/hints in your clozes (e.g., {{c1::cloze::hint}}).
<script>
var currentCloze = document.querySelectorAll(".cloze");
var nextAction = "showCloze";
for (var i = 0; i < currentCloze.length; i++) {
currentCloze[i].setAttribute("data-original-content", currentCloze[i].innerHTML);
}
function toggleAnswer() {
for (var i = 0; i < currentCloze.length; i++) {
if (nextAction === "showCloze") {
currentCloze[i].innerHTML = currentCloze[i].getAttribute("data-cloze");
} else {
currentCloze[i].innerHTML = currentCloze[i].getAttribute("data-original-content");
}
}
nextAction = (nextAction === "showCloze") ? "hideCloze" : "showCloze";
}
</script>
The code relies on the data-cloze attribute, which is a relatively new addition to Anki and might not have been integrated into official AnkiDroid releases yet. For example, I believe the data-cloze attribute might still be absent in AnkiDroid 2.16. I tested the script on AnkiDroid 2.17alpha17, and it seems to work fine.
If I recall correctly, the developers mentioned that a beta for version 2.17 should be available in about two weeks. If you’re feeling adventurous and want to try an alpha release, you can find it here: Releases · ankidroid/Anki-Android · GitHub