Forum Discussion
Stephanie
12 years agoSuper Hero
User notes that they can print and email
Hi all. I built a course earlier this year that contains a "notes" function to allow users to take a moment to reflect and type their thoughts on certain questions. This is used in place of a typica...
onEnterFrame
9 years agoCommunity Member
Hmm I don't recall if SL strips the line breaks out when it saves the variable. If not then they are probably in there as '\n' which will not be displayed in HTML. (Your email editor probably defaults to HTML). So you will need to find all instances of '\n' and replace them with '<br/>'.
It would be easier if your were using a library like jQuery but it can be done with generic JS something like this:
your_string.replaceAll(new RegExp('\n', 'g'), '<br/>');
We are using the standard JS replaceAll function but have to use a Regular Expression to match the pattern of the unseen ASCII line breaks.
Your milage may vary on the code above as I didn't test it before posting it here....
Related Content
- 9 months ago
- 7 months ago
- 8 months ago
- 9 months ago
- 12 months ago