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

Custom character sheet - string attribute containing line breaks?

1758680998
Quinn
Pro
Sheet Author
Working on a custom sheet. Say I have a Class attribute, then a Class Description attribute. When I set Class to Test, I want Class Description to show: Test Test First attempt: Setting string to "Test\nTest". Result: It just says "Test Test" on one line. Second attempt: Setting string to "Test<br />Test". Result: It says "Test<br />Test" on one line. Is there no way to have an attribute store more than one line of text?
1758685181

Edited 1758685572
vÍnce
Pro
Sheet Author
input's do not allow line breaks.  textaraea can have multiple lines though.   You can also define a roll template key and value to display attribute's however you like.
1758694483
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, just need the proper html element. Once you have the right element, you'll just use setAttrs in a sheetworker to set the value to be "line 1text\nline2 text". If you are using an attribute backed spam, you'll need to use css to change the white space handling (likely to "pre-wrap").
1758723943
Quinn
Pro
Sheet Author
pre-wrap! That did the trick, thanks.