2 Replies Latest reply on May 7, 2012 2:39 PM by raylaur

    TextArea.htmlText not working

    raylaur Level 1

      I'm loading HTML formatted text from an XML file and using a TextArea to display it. The XML is using CDATA to encapsulate the HTML string.  The TextArea has html set to true. Everything works fine when use TextArea.text to render the HTML string from the XML.  But when I use TextArea.htmlText, no text appears in the TextArea.


      Why not just stick with TextArea.text if it works fine?


      I want to make it easier to enter text in the XML.  For a long pieces of structured text I want to type it in multiple lines and blocks using line returns but haved the returns ignored when parsed so that text will flow into the TextArea as if it were one line.  I read you can do this using condenseWhite on the TextArea but this only works with TextArea.htmlText.


      Any suggestions?


      1) either for getting TextArea.htmlText and condenseWhite to work or,

      2) breaking up text in XML so that it can be on multiple lines yet be treated as a singe string when parsed by the XML loader?



        • 1. Re: TextArea.htmlText not working
          Ned Murphy Adobe Community Professional & MVP

          I don't think it's a case of TextArea.htmlText not working so much as it's a case of there not being an htmlText property for the TextArea in AS2.  AS3 versions support it, but I believe in AS2 you need to specify the html property to be true and assign the text to the text property.


          ta.html = true;

          ta.text = "<b>your html text</b> here";

          1 person found this helpful
          • 2. Re: TextArea.htmlText not working
            raylaur Level 1

            You are right.  I assumed there was a .htmlText property and .condenseWhite like a text field.  I guess I'll have to find some other way to make text editing in XML easier when working with large amounts of text.  Currently  it all has to be on one line which is too time consuming to format when there is a lot of it.