Search code examples
actionscript-3textareaflash-10

textarea shows 2 lines when htmlText is set


I am using a TextArea. I set its htmlText as follows:

textArea.htmlText = '<P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#FFFF00" LETTERSPACING="0" KERNING="0"></FONT></P>';

The problem is that there are always 2 lines in text area when it runs. When I remove this i get usual one line but then i m not able to set color and all.

I want to use textarea, set different colors on it and I don't want 2 lines in that.


Solution

  • hi probably this is the flash bug. i think <p></p> tag creates new line itself so i just removed <p></p> tags from htmlText and it solved my problem

    Actually if i remove <p></p> then there is a format problem so the best solution is to remove '>' from <p>something</p> so new line will not be there.

    Regards