Javascript Linebreak in long strings

Feb 09, 2018

Hi,

What is the advised way to insert line breaks in text variables? I have obviously tried \n (and also \r and <br/>), but for reasons entirely unknown to me these reduce the font size to something around 4.7

here's the code I tried

var player = GetPlayer();
var fb = player.GetVar("txtFeedbackAll");
var newFB = "some new feedback";
fb = newFB + "\n" + fb;
player.SetVar("txtFeedbackAll",fb);

Any suggestions anyone?

5 Replies

This discussion is closed. You can start a new discussion or contact Articulate Support.