Type the first letters of an answer: Anki template

Hello! I have been trying to add an anki template into my note type. My objetive is to memorize verses of the bible. And I wanted to achieve that by typing the first letter of each word. A fellow anki user has developed something for this use, but, since I am a newbie on this anki template coding stuff, I wasnt able to use it.

Link to his code: type-first-letters-input/_first_letters_typebox.js at master · abdnh/type-first-letters-input · GitHub

I already tried to follow ChapGPT’s advice below, but wasnt successful:

Sure, here’s how you can add the CSS code into your Anki template:

  1. Open Anki: Start by opening Anki on your computer.
  2. Access Note Types: Go to the Tools menu, then select Manage Note Types.
  3. Select Note Type: Select the note type you want to add the CSS to, then click on Cards... to open the card templates.
  4. Add CSS: In the card template editor, you’ll see a box labeled Styling (shared between cards). This is where you can add your CSS. Copy and paste your CSS code into this box.

Could someone please explain to me step by step on how to add his code into my anki template?

1 Like

Have you tried following the instructions in the readme? There’s a sample template to download. You can either use that, or it will at least show you what your templates will need to look like.

1 Like

Yes, I saw the readme instructions. But, it doesnt say much infortunately. I tried putting his code into the “styling” at the anki template, but without success. I really tried everything I could on this one.

Did you download and import the “template” (note type) that abdo provided?
That should add the embedded files to your collection and show you exactly what you would need to add to your own template.

Pro-tip – once you download it, change its extension to apkg so it will be importable.

1 Like

Yes! I imported the file as apkg, but it didnt change anything. It only created some weird nonsense flashcards. This is all very new to me. So I may not know some very basic stuff for this to work…

When you imported the “template” file, it came with one sample note that makes one card. (Yes, it says nonsense things in its “Input” field.) But what it really gave you was a new note type called “Type first letters” –
image

A note type is a set of fields where you enter information, and instructions that tell Anki how to turn that into cards. So you can –

  1. Use that note type for your own notes. – Add note > (choose that note type)
  2. Modify that note type to make cards that look like you want them to. – Manage note types > Cards… > (edit the templates)
  3. Copy parts of those card templates and add them to your own note type that you’re already using. – Manage note types > Cards… > (copy the templates)

This particular note type came with those JS and CSS files attached, and when you imported it, those files were added to your collection. The card templates have a reference to them, so you don’t need to paste that text anywhere.
image
image

2 Likes

Nice! It worked! Thanks for the help so far. I didnt know it had to be an apkg file to be imported into anki… So, I have 2 last problems, if you could help me:

1.I wanted anki to give me the address of the verse and for me to type the first letter of the verse (Photo 1)

However, when I finish editing, it only appears the verse field. How do I fix this? (Photo 2)

2.(Perhaps I should create a new topic on ankidroid about this one, but I will ask it anyway). When I open this same flashcard on ankidroid, the keyboard doesnt pop up. I even installed an appear keyboard at all times app, but it has no effect. Suggestions?

  1. If you want something else to appear on the front of your card, you can add that to your front template. Try adding {{Address}} at the top of your front template.

  2. This note type is using standard type-answer functionality. Do you have other “regular” type-answer cards that you use? Do they work correctly in AnkiDroid? There are 2 type-answer-related settings you can check on. Settings > Advanced – look for “Type answer into the card” and “Focus ‘type in answer’.” I think those should both be on – are they?

2 Likes

Danika, you are simply perfect! Thank you so much for your help. Both problems solved. I am very very grateful!

2 Likes

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