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

Roll Query containing custom text from Input field "please help"

1742547619
Mago
Pro
Sheet Author
hello forum, im doing some tests on dynamically changing the text inside the Roll Query "Macro Options" popup so far this works <button style="width:20%" type="roll" value="/r ?{@{testname}|0}" name="roll_test"></button> <textarea name="attr_testname"></textarea> however, i encountered this issue: The text in the <textarea> does not break when sent to the Query window, i tried escape characters and html characters but they dont seem to work except for the   character but that one does not break the line i also tried the wrap="hard" property and the CSS white-space: pre-wrap; and word-wrap: break-word; but they dont have any effect on the Query any insight on this is appreciated 
1742567225

Edited 1742567321
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The prompt of a roll query can't be multiline; we have no way to affect any styling on the query itself. The values of the query can be multiline, although only once the option is sent to chat; in the drop down, they will still be single lines.
1742579626

Edited 1742579685
vÍnce
Pro
Sheet Author
It would be soooo nice to expose the query window up to sheet authors. You can force a "faux" newline by inserting LOTS of ` ` but that is a real pain given the number of repetitive spaces that must be adjusted depending on each new lines text length and if a user resizes the prompt window it blows up. only checked in non-JG...
1742605460
Mago
Pro
Sheet Author
this is rather disappointing after some inspecting, the query box has this class for the text inside .vtt-macro-selection-ui-dialog strong by adding, "white-space: pre" it does what i need, however i tried using the universal selector (*) from the sheet css, but is no good, i think the sheet css only adds inline styles to everything within the ui.dialog charsheet class that may explain why the inline styles were been overwritten/ignored by that bug last year please roll20 add "white-space: pre" to the query box :(
1742613121
vÍnce
Pro
Sheet Author
I tried drilling down to the query window with css as well... which worked, temporarily.   As soon as I refreshed the game, roll20 sanitized everything outside the normal sheet access. Stylus could used to override/inject css, but that would only change the query for the person using it.
1742616722
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The sheet css is only applied within the Iframe that contains the character sheet window. This includes the Bio/Info and A&A tabs, so you can style those, but nothing outside of them. And then roll template styling is very restrictive using the legacy sanitization mode, and ignoring everything that doesn't start with .sheet-rolltemplate-your-template-name.