# Convert htmlText info to TextFormat object

**URL:** <https://forum.kirupa.com/t/convert-htmltext-info-to-textformat-object/309851>\
**Category:** Uncategorized\
**Created:** [May 26, 2010, 5:56am UTC](https://forum.kirupa.com/t/convert-htmltext-info-to-textformat-object/309851 "2010-05-26T05:56:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ram\_Anand](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@Ram\_Anand](https://forum.kirupa.com/u/Ram_Anand)\
**Post date:** [May 26, 2010, 5:56am UTC](https://forum.kirupa.com/t/convert-htmltext-info-to-textformat-object/309851/1 "2010-05-26T05:56:46Z")

</div>

Hi all,

I need some help with regard to conversion of htmlText ( which contains all the formatting info ) to an equivalent TextFormat object… so that I can transfer the htmlText info ( with formatting ) to a TextFormat object and then apply them to any textfield…

You may wonder why this approach when it can be done directly using the htmlText? Cos I am trying to manipulate the text field by resizing it ( with a user-controlled handle )…It works fine when I use normal text, but when I use the html=true, the resize seems to go haywire… ( if any one has tried this earlier… I would like to hear about getting around this )

I need to apply the formatting at the same time make it resizable ( by user ) as expected… which could be done if the html formatting info can be applied as a TextFormat object to the text field… rather than set the htmlText=“someFormattedText”.

In short, I am looking for a parser that would read the htmlText info and convert it to TextFormat object(s).

Working on AS2 - Flash 8.

Any help would be greatly appreciated.

Regards,  
Ram
