Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide a simple way to display tags in the card. #22

Open
Tracked by #6
timgreen opened this issue Nov 22, 2022 · 1 comment
Open
Tracked by #6

provide a simple way to display tags in the card. #22

timgreen opened this issue Nov 22, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@timgreen
Copy link
Owner

No description provided.

@timgreen timgreen mentioned this issue Nov 22, 2022
3 tasks
@timgreen timgreen added the enhancement New feature or request label Nov 22, 2022
@timgreen
Copy link
Owner Author

https://github.com/reuseman/flashcards-obsidian is using this script in the front/back template to archive it.

<p class="tags">{{Tags}}</p>

<script>
    var tagEl = document.querySelector('.tags');
    var tags = tagEl.innerHTML.split(' ');
    var html = '';
    tags.forEach(function(tag) {
	if (tag) {
	    var newTag = '<span class="tag">' + tag + '</span>';
           html += newTag;
    	    tagEl.innerHTML = html;
	}
    });
    
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant