markhavemann Posted August 23, 2021 at 03:00 AM Report Share Posted August 23, 2021 at 03:00 AM 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}}. 1 2 Quote Link to comment Share on other sites More sharing options...
sanchuan Posted August 23, 2021 at 04:32 PM Report Share Posted August 23, 2021 at 04:32 PM 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}})? Quote Link to comment Share on other sites More sharing options...
markhavemann Posted August 24, 2021 at 02:08 AM Author Report Share Posted August 24, 2021 at 02:08 AM 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. Quote Link to comment Share on other sites More sharing options...
sanchuan Posted August 24, 2021 at 12:24 PM Report Share Posted August 24, 2021 at 12:24 PM 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.