Forum Discussion
Keep "Text Entry Field" Line Breaks When Displaying the Variable in a Text Box?
Hi Matthew and Rebecca,
I actually found a workaround for my particular issue. I found that inserting the <pre> (and </pre>) tags in the html code before and after the text variable had the effect of keeping the line breaks in the html output.
Here is an excerpt from the code. 'res' is used as part of the html code, 'mine_noter' (my notes) is the Storyline variable saved from the text input field.
res = res + "<br><pre><i>Mine noter<br>" + mine_noter + "</pre></i><br>";
Hope this helps :-)
Morten
Thank you so much Morten!
This worked!
The <pre> </pre> around the variable did give me the line breaks I was after, but then the text wasn't wrapping so I edited to <pre style='white-space: pre-wrap;'>
and it works!!
I really appreciate your help. :)
Thanks again,
Rebecca
Related Content
- 10 months ago
- 3 months ago