Answers not being checked in multi-line card

I have been using a multi-line add on for some time that has now been deprecated. I’d like to include a link to the add on but the forum doesn’t allow links. One of the reviews posted a card template and it almost works. I can type in multi-line answers but when I click the “Show Answer” button it doesn’t compare the input to the answer and highlight the incorrect/correct parts, it just displays both.

I created a field called “Scratch” as directed and here’s the relevant part of the front template

<textarea id="scratchFront" style="width: 100%; height: 100px;"></textarea>

<script>
if(localStorage.getItem('scratch')){
  document.getElementById("scratchFront").value = localStorage.getItem('scratch');
}
document.getElementById("scratchFront").addEventListener("input", function() {
localStorage.setItem('scratch', this.value);
});
</script>

Looks like the way to specify the answer field for single-line fields without using javascript would be {{type:Scratch}}, but how do I specify the answer field to be used in the comparison in script?

The template doesn’t implement the checking part, so it’s not really a complete replacement for the add-on.

Looks like someone published an updated version of the add-on: Multi-line Text Answer Input - AnkiWeb

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.