I heavily use cloze cards for creating cards.
During Review - When I click Show Answer - Hints of Clozes are stripped away.
There are few cases when I take some time to formulate the info and forget what was the initial question ?
also if question is visible it makes much sense
It looks like hints are being stripped away at Back of the anki
Content of a sample Card
System of Government
{{c1::
Answer
::Why Parliamentary System of Governance preferred ?}}
{{c2::
Answer
::Important Features of Parliamentary System of Governance ?}}
{{c3:::: Question here }}
{{c3::
Answer
}}
{{c4::
Answer
::Question}}
{{c5::
Answer
::Evidences of Declining Political Democracy Standards}}
{{c6::
Answer
::Reforms wrt Political Democracy Standards}}
I tried following code but it is not working can someone please give me some pointers
Initial Script I tried
<div>{{cloze:Text}}</div>
<script>
document.querySelectorAll('.cloze').forEach(el => {
let parts = el.innerHTML.split("::");
if (parts.length > 1) {
el.innerHTML = `<b>${parts[0]}</b> <span style="color: gray;">(${parts[1]})</span>`;
}
});
</script>
<div id="cloze-container">{{cloze:Text}}</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('.cloze').forEach(el => {
let originalText = el.getAttribute('data-cloze'); // Fetch raw cloze content
if (originalText && originalText.includes("::")) {
let parts = originalText.split("::");
if (parts.length > 2) { // Ensure there's a hint
el.innerHTML = `<b>${parts[1]}</b> <span style="color: gray;">(${parts[2]})</span>`;
}
}
});
});
</script>