Reputation: 15245
I have a textfield where the user can type what ever he want into it. When the user is ready typing he can hit the send button. when he does that i get the text from the multiline textfield and pass it to my backend. there is only 1 problem the text is formated in 1 single line, (html text is no option!) is it possible to set after every line a \n character?
Upvotes: 0
Views: 11788
Reputation: 15245
var st : String ="";
for (var i:int = 0; i < tf.numLines; i++) {
var s:String = tf.getLineText(i) + "\n";
st += s;
}
does the trick
Upvotes: 1