Detect Carriage Returns

var cr:String = String.fromCharCode(13);
var regEx:RegExp = new RegExp(cr, "g");
var formattedText = contentInput.text.replace(regEx, "<br>" + cr);

0 Comments

You must be logged in to post a comment.