Text htmlText and BR tag

277 Views Asked by At

I have some problem with htmlText property into a Text control

<mx:Text id="txtTestoMessaggio" width="100%" htmlText="{contenutMessagge}" condenseWhite="true" styleSheet="{styleHTML}"/>

where contenutMessagge is

<b>test</b><br/>
<br/>
test<br />
<br />
<font color="#FF0000"><br />
red</font>

is showed as

"test test red"

So BR tag are ignored ... why ?

&#13; instead of <br/> works !!!

1

There are 1 best solutions below

3
Wang Yu On

This "html text" is not a real browser - its capabilities are extremely limited. As far as I know, <b>/<i>'s are generally supported.

I'd suggest you give a try on place plain newlines ('\n') instead of <br/>s.