My basic reverse cards need some design tweaks that I can not make myself

I have invested a lot of time into making this basic reverse card vocabulary deck. I put word usage quotes along with definitions on each card without thinking about it and now I have 185 reverse cards that look like this.
example
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

cause or give rise to (a feeling, situation, or condition). “the issue engendered continuing controversy.”
verb


                               engender

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I don’t know how to redact the usage quote until I reveal engender as the answer. I want to see the quote after I have answered the card.
desired effect before answering
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

cause or give rise to (a feeling, situation, or condition). ////////////////////////////////////////////////////////////////////////////
verb

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
desired effect after answering
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

cause or give rise to (a feeling, situation, or condition). “the issue engendered continuing controversy.”
verb


                               engender

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sorry for the terrible formatting I am 15 years old so this is new to me! thank you very much for your time.

I recommend creating a new field and putting example sentences in it. This way, you can simply include {{Example}} in your back template to reveal the sentence only after you answer the card. Eg:

Front Template

{{Definition}}

Back Template

{{Word}}
<br>
{{Example}}

If you already have a lot of cards formatted as you shown and want to fix them to move the sentences to the Example field, you probably need to use a custom Python script or something (Find and Replace won’t work here).
For existing cards and your current notetype, you can add some JavaScript code to your template to hide the sentences in the front side. Eg:

Front Template

<div id=front>{{Front}}</div>

<script>
if(!document.getElementById("answer")) {
  var front = document.getElementById("front");
  front.textContent = front.textContent.replace(/“.*”/, '');
}
</script>

Back Template

{{FrontSide}}

<hr id=answer>

{{Back}}
2 Likes

someone needs to dumb this down for me because I am ruining my deck trying to trial and error this.

sorry

Did you try including the last front/back templates I posted in the templates screen? Make sure to change the field names as necessary. If you’re getting any errors, please post them here.

what card do I put the script into the 1st or the 2nd?

I have someone from my school that is going to help me do this because I am to dumb to do it myself :persevere:

Thank you for all of the help that you have given me

I just can’t figure out what to change in order to make the code work.

Select your notetype in the editor, then go to Cards.

You’ll find there sections for the front and back templates. Paste the code I posted there.

1 Like

the images above are what I have on Engender card 1 but the new code dose not appear on card 2. card 2 is the card that needs to be changed. when I try to edit your code for card 2 it dose not have any effect.

are you there Abdo?

If you have the target word in the Front field, paste this slightly modified code in Card 2 instead:

Front Template

<div id=back>{{Back}}</div>

<script>
if(!document.getElementById("answer")) {
  var back = document.getElementById("back");
  back.textContent = back.textContent.replace(/“.*”/, '');
}
</script>

Back Template

{{FrontSide}}

<hr id=answer>

{{Front}}
1 Like

The result I got when I put the code into card 2 was really, really close to what I am looking for. I just need the quoted sentence to disappear instead of change color.

I got this instead.
anki_jitHx0rjnK

Can you export a sample card (see Notes > Export Notes in the browser) and share a link here after uploading it somewhere, so we can test it?

I can not find anything about “Export Notes in the browser” on the Anki manual. All I found was stuff about exporting. I tried to export a sample card to you but it’s format is incompatible with this reply box. where can I “upload” my exported sample card so I can share a link to you? Where are the notes that you are suggesting me to reference from?

Select that engender card in the browser, and click on the Notes > Export Notes… menu item.
image

Then upload the apkg file to some file sharing service like https://gofile.io/ and post a link here.

h
ttps://gofile.io/d/WHQx ms

Remove the space in-between x and ms. the reply box would not except links so I put a space to make it undetectable.

also h obviously goes in front of ttps.

{{Back}}

A user sent this to me and it nearly works. all that is wrong is that it cuts everything after the quote.