Memrise card template [support thread]

Adding the following to the “USER STYLES” section should do the trick:

.card-content.front {
	grid-template-rows: 3.81rem;
}

That did it, thanks a lot!

I am using version 25.02.5 (29192d15). I’ve not been able to solve my problem, but I have another question, namely how did you format the line shown in the photo to look like this (photo 1) instead of (photo 2)
Знімок екрана 2025-07-28 051344

You are still welcome to share you note if you would like me to have a look at it.

Current versions of the template do not use stock Anki typing, so they don’t involve the comparison method displayed on your second image in the first place. Instead, the template uses Ratcliff-Obershelp algorithm (my suboptimal implementation of it, at least) to directly compare two strings (typed vs expected answers) and formats the resulting diff in the style Memrise used to display it. There is a standalone demo, which I made before putting this procedure into the template, where you can check the source code and see how the diff changes when the strings are modified in real time:

https://codepen.io/Eltaurus/pen/OJYWKyx

Before all of this was implemented, the template used the comparison output produced by Anki and simply merged all the “.typeGood”, “.typeBad”, and “.typeMissed” fragments into a single sequence of HTML elements, achieving the same result.

Here is a link to Google Drive https://drive.google.com/file/d/1V0SyLHipTvAwynWqo6eYPHDYQ_NwwCas/view?usp=sharing. I would be very grateful if you could try to replace

<input id="typeans" type="text" inputmode="text" autocorrect="off" autocomplete="off" autocapitalize="off" spellcheck="false">

with the Anki’s default field replacement:

{{type:Learnable}}

because you saw what happened to me after the replacement
:smiling_face_with_tear:

I’ve tested it on several versions of Anki, including 25.02.5, but it all looks just fine:

Are you sure you didn’t accidentally remove one of the trailing tags when doing the replacement the last time? Because this is what typically leads to this sort of a problem.
If you are able to replicate the issue again, can you send me the template in the broken state instead of its original form?

It looks like it happened last time, because now everything is working :melting_face:I am going to cry with happiness as I am sincerely grateful to you for your help and quick response :people_hugging:

I’m glad everything worked out for you in the end :slightly_smiling_face:

On a side note, for the template to work as intended, it is better to move all your custom layout code inside the card generation conditions:

This will make a difference if any of the notes you make in the future are filled in sparsely.

This has been my biggest problem, but there are also little nuances that I would like to ask you about. I’ve been working on my own note type for a long time, and I found out about a feature in Anki that allows me to hide a field I need with the Hidden Content button. I have successfully added it to my note and would like to add it to your script as well, but when I insert this button, my entire script breaks. Could you please tell me what the problem might be, or if it is possible to replace this function with some other alternative? For more insight, you can see my note type and Hidden Content button at the same link https://drive.google.com/file/d/1V0SyLHipTvAwynWqo6eYPHDYQ_NwwCas/view?usp=drive_link

Thank you very much again!!!

I am not aware of anything like that as a general Anki feature, but there are many ways of making such a feature with basic JS. Are you referring to some particular implementation? If so, could you provide a relevant link?

I’m not seeing any mentions of a button like this in the code. Could you point me to something specific I should look for?

I’m sorry, I gave you the wrong link. You can see what I’m talking about at this link (first line in the script) https://drive.google.com/file/d/1snaUPYZhj_dRIwvG4H6A56_hz7SFP_tB/view?usp=drive_link

This link is restricted:

Hello Eltaurus and thank you for your continued work on this template.
I wondered if it was possible to remove the random playing of audio files so that the cards play all the files. I like the idea and will use it for my vocab cards but unfortunately for some of my sentence cards, the whole is audio is cut in 2 or 3 files so I need all the files to read to get the whole sentence. If there is no easy way, I can combine the files in Audacity. Thanks again.

I’m sorry, here https://drive.google.com/file/d/1snaUPYZhj_dRIwvG4H6A56_hz7SFP_tB/view?usp=sharing

For the autoplay itself, you only need to find and comment out/delete the following piece in the front template scripts:

	if (chosenAudio.onclick) {
		chosenAudio.click();
	} else { // AnkiDroid #18235 bug
		androidAutoplay(chosenAudio);
	}

It’s not a very neat way, as it will require you to repeat the same adjustment in future versions of the template if you decide to update, but it should work. Maybe I’ll make it an option to be enabled through the user scripts section at some point.

Removing the code above will prevent the animation from playing on card load. To turn it back on, you can add this code to the same place:

	if (audioButtonsFront && audioButtonsFront.length > 0) {
		audioButtonsFront[0].classList.add('active');
		audioButtonsFront[0].classList.add('pulse');
	}

If you also would like the buttons for all the audio fragments to be displayed on the question side (Memrise always displays only one), you can add the following to the user styles section of the styling tab:

.mem-question a.replay-button.replay-button.replay-button { 
  display: inline-flex;
}

Everything works, but now I have the following problem, the sound started to double :tired_face: I think the problem may arise from this additional window that pops up before the back card is displayed (photo 1), but this is just a guess. Perhaps you can remove it, leaving the following fields on the back card (photo 2). Because I tried to remove that window myself, but the following fields were deleted…


The native Anki way would be to use the hint: filter. E.g.:

 {{hint:Translate}}

You can then use .hint[href] and .hint:not([href]) CSS selectors to style its hidden and revealed forms (or just .hint to make a style for both). To apply the Memrise template styles, for example, add the following to the “user scripts” section:

.hint {
	height: 3rem;
	line-height: calc(3rem - 2 * var(--border-width));
	font-size: 1.125rem;
	font-weight: 600;
}
.hint[href] {
  cursor: pointer;

  color: var(--col-button-text);

  border-radius: var(--border-r4);
  border: var(--col-button-border) solid var(--border-width);
  background: var(--col-button-bg);

  --elevation: var(--elevation-idle);
  box-shadow: var(--col-button-border) 0 var(--elevation) 0;
  transform: translateY(calc(4px - var(--elevation)));

	width: min-content;
	padding: 0 1rem;
}
.hint[href]:hover {
  --elevation: var(--elevation-hover);
}
.hint[href]:active {
  --elevation: var(--elevation-pressed);
}

I’m not sure what window you are referring to, but I suspect the double audio might be caused by the conflict between Anki autoplay function and template’s own one. You can try disabling the Anki autoplay in the deck settings:

image

(to disable the template autoplay instead, you can use the method from my previous reply to @fabmir79)

This looks incredible, thank you!!!