0 Replies Latest reply on Dec 16, 2011 1:52 PM by jDubz_

    htmltext background color




      My problem is: I need support for styling text background color inside htmlText property of a Text (or TextArea) control, for text that is marked up with html tags.


      I am aware that Flex's htmltext only supports a subset of actual HTML tags:


      <font color='#ff0000'>the text</font>                       is supported

      <font backgroundColor='#ffffff'>the text</font>      is not supported


      And this is a problem for me because I absolutely need to be able to change the background color for certain words in the text. I searched a lot for a solution with no success. The only thing I see that supports background color is the TextField object, but I have no clue how I would implement it in the same manner as the Text or TextArea control. Does anyone have any suggestions?



      (compounded with this is that rather than use:  <font color='#ff0000' backgroundColor='#ffffff'>the text</font>, the text is marked up with <span id='group1'>the text</span> tags, and these CSS IDs are being processed with a stylesheet object in actionscript. So ideally, the solution should also work with stylesheets, but I can work around it if I'm forced to resort to hardcoding in the HTML tags.)



      Thanks for your attention.