Jump to content
Chinese-Forums
  • Sign Up

Anki Pro Tip: Expand/Collapse information


Recommended Posts

Posted

Just found this and I thought I would post it here for other Anki users. 

 

In card layouts, any information you put in between <details></details> tags will be collapsed and hidden automatically with a little heading of "details"

 

This is useful to keep things short if you have lots of information that you want to keep, just in case. Long cards mean that you can't use up and down swipe shortcuts on Ankidroid because it scrolls instead (I use swipe up to mark a card and swipe down to bury).

 

Edit: As mentioned below, if all you want is to hide a single field, without anything else, you might find it easier to include the field and append "hint:" to the field name, ie, {{hint:Fieldname}}.

 

image.thumb.png.f50ab3841755b40608c1373d240c404a.png

 

image.thumb.png.154b733c4c8f82e9ccba3bdb6d3737ca.png

  • Like 1
  • Helpful 2
Posted

Thank you for that. This seems to work on a field-by-field basis, so that any field enclosed by those tags will be hidden.

 

Is it any different to just appending "hint:" to the field name (ie {{hint:Fieldname}})? 

Posted
9 hours ago, sanchuan said:

Is it any different to just appending "hint:" to the field name (ie {{hint:Fieldname}})?

I actually didn't know about that. I'll add it to the main post since it's quite relevant. 

 

The difference is that anything you put between the details tags will be hidden, whereas, as you said, hint: is limited to a single field (nice and straight forward if that's all you want). With details you can include headings and content, as well as multiple fields if you want. 

 

You can also style the little "details" heading by adding an ID or class to the tag, and I guess the styles will be applied to anything under it too.

 

image.thumb.png.fcd7192997701771963a30d63ed71f9d.png

Posted

All clear now: same function but different scope. Thank you for adding it to the main post - helpful to have them mentioned together for future reference. 

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...