Editing type in answer formatting

I am using anki with the type in answer feature on a number of different cards. I use the feature becuase I find having to write out the idea makes me better able to recognize if I am actually understanding it. Whether or not i got the specific words right is not as important as making sure I am getting the main idea.

What I would like to do but have been having a lot of trouble with, is type in the answer, then have a display which has the answer I typed in (no red/green/grey coloring) exactly as I typed it. Importantly, I have been having particular trouble with figuring out how to get rid of the “–—–” which makes it much more difficult to read the answer I just typed out. Then, below that, I would like the “correct” answer to be displayed, also without formatting.

Mostly, this is for basic (type in answer) cards, but I would also like to do this with cloze (type in answer) cards.

The manual – Field Replacements - Anki Manual – explains how you can change the font and the colors. I’m not sure there’s a way to display your original answer, because the entire purpose of this note type is to compare the answer for you and show you what’s different.

If you don’t want that – you just want to type an answer, and compare it yourself – perhaps this isn’t the right feature for you. You can do that with a text entry box that persists to the other side of the card. [Search this category for several possible Javascript implementations.]

That’s easy. Add your {{answerfield}} again as a field replacement.

To remove the background from the typed answers on the back just add the following to the styling tab:

.typeGood, .typeBad, .typeMissed {
    background: none;
}

To also remove the filler dashes in the typed part, add this as well:

#typeans .typeMissed:not(br ~ span) {
    display: none;
}

These two together should leave the answer you typed exactly as you typed it and the correct answer right below.

The typing in basic and cloze cards works the same way, so the solution is valid for both.

1 Like

And if you want to remove the arrow as well, you can use this in addition:

#typearrow {
	display: none;
}
1 Like

Have you two just devised an easier method for users who want to type their answer, but skip the char-by-char comparison? :astonished_face: They can use the built-in type-answer functionality, but then make Anki show them only the raw text. This seems to satisfy that need pretty thoroughly, doesn’t it?

I’ll be perfectly content to find I’ve been wasting my time keeping track of Javascript/session storage/persistence text-input-box solutions to direct users to.

I wasn’t aware that was a whole issue on its own :slightly_smiling_face:
But this method only changes the styling of the presented answer; it does not implement the typing itself and, as such, won’t work on AnkiWeb. So solutions involving LocalStorage() or similar methods are still required for issues like the one in your linked thread.

1 Like

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