Is {{Tags}} just a string or are they wrapped in html?

It seems {{Tags}} are just a string, they don’t seem to be (or I can’t check that they are) wrapped in a HTML element. For instance, if I were to do this in .mustache format, I’d do the following:

"Tags" : ["tag1", "tag2", "tag3"]
<ul>
{{#Tags}}
  <li>{{.}}</li>
{{/Tags}}
</li>

And they’d be nicely wrapped for formatting with CSS.

As it’s difficult to view the html that Anki outputs in preview, is there currently any selector that can be used right now (for each individual tag)? If that’s a no, I’d suggest to add in either:

  1. A way to loop the tags as above, or
  2. A wrapper element per tag so they can be styled

For tags with long names, or many tags, it looks unsightly at the moment.

It seems that the plugin “clickable tags” wraps them in <kbd>, but I prefer to use stock Anki as plugins have a tendency to die out.

1 Like

is there currently any selector that can be used right now (for each individual tag)?

I don’t believe so


As it’s difficult to view the html that Anki outputs in preview,

For Anki Desktop: Use the AnkiWebView Inspector

  • Open the ‘Add Note’ screen
  • Enter a few fields
  • Cards…
  • Right click → Inspect

https://ankiweb.net/shared/info/31746032


For AnkiDroid: chrome://inspect

4 Likes

@David Oh that’s a handy tool. I don’t think I’ll need it much, but it seems good to check what html Anki is outputting. I don’t have an Android device, but good to know. Thanks!