Things I have tried
Searched the forums and google.
What I’m trying to do
Have a list with all my tags. Could be in a note, could be as an export, doesnt matter. just want to have a list with all the tags that i am using. just the tags.
Searched the forums and google.
Have a list with all my tags. Could be in a note, could be as an export, doesnt matter. just want to have a list with all the tags that i am using. just the tags.
Here is a Templater template that will list all the tags as a Markdown list:
<%*
const cache = app.metadataCache;
const tags = Object.keys(cache.getTags());
tags.forEach(tag => {tR += ` + ${tag}\n`});
-%>
Thank you so much, but i am trying to not use any community plugins.
Anyone?
this is only a workaround:
Object.keys(app.metadataCache.getTags()).join(', ')
into the console panel and press Enter.If you want to remove the hash (#) from the start of each tag, use Object.keys(app.metadataCache.getTags()).map(x => x.slice(1)).join(', ')
Although really your life would be easier with Templater or Dataview because then you could put this into a note:
```dataviewjs
dv.list(Object.keys(app.metadataCache.getTags()))
```
And now you have a nice bullet list of all your tags, right there in your note and automatically updated.
Thanks for the workaround
That does the trick. Million thanks. Have a good one.
the debug console,emmm,brilliant!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.