Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

mini-database (using html data attributes) inside character sheet for feats and spells in custom game

1482636770

Edited 1482636951
plexsoup
Marketplace Creator
Sheet Author
API Scripter
I'm working on a custom character sheet. I want to create a little mini-database of feats and spells. Each feat or spell will have multiple attributes which can be searched for. (eg: Themes, Relevant Attributes, and Mechanics-Categories) For example:&nbsp; &lt;div class="sheet-feat" data-skins="nature, alchemy" data-attributes="intellect, empathy" data-categories="control, root"&gt; &lt;div class="sheet-featName"&gt;Grasping Tendrils&lt;/div&gt; &lt;div class="sheet-featDesc"&gt;Reach out and hold anyone withing 3 squares radius.&lt;/div&gt; &lt;/div&gt; I have a working jsfiddle, but I can't get it to work in Roll20. It seems like roll20 strips out my data- attributes in the html. <a href="https://jsfiddle.net/L035dLsz/3/" rel="nofollow">https://jsfiddle.net/L035dLsz/3/</a> Anyone know what I'm doing wrong?
1482658804
plexsoup
Marketplace Creator
Sheet Author
API Scripter
I got it working by putting the database tags in the title field. It's a bit goofy, but it works. It'd be cool if we had more access to arbitrary data- attributes. or if we had a couple of dummy data attributes we could use (like the data-i18n tag) for character sheet development. I'd be happy with one called data-tags or something like that.
1482683542

Edited 1482683563
vÍnce
Pro
Sheet Author
That's interesting. Have to experiment... &nbsp;We actually do use data-i18n for translations.
1482700669
plexsoup
Marketplace Creator
Sheet Author
API Scripter
Yeah. With data-i18n reserved for internationalization, I didn't want to hijack it for my feat database tags.