How to add a line break in a flex TextArea

By | 25 May, 2011

To add a line break inside the text of a TextArea component in flex we cannot use \n, but instead use ‘
’ (without the quotes).

For example:

<s:TextArea text=”this text will be on the first line&#13;and this one on the second” …/>

will produce a text box with this text:

this text will be on the first line

and this one on the second