views:

144

answers:

2

I want to make a text highlight in flex textArea but its htmlText doesn't support <font bgcolor='#FFFF00'> part of my text </font> so I'm searching for a font witch is the opposite of Courier new, when I embed it in flash, and write with that color I get highlight effect for that part of my text , as I type <font family="negativeOfCourier" color='#FFFF00'> part of my text </font>

+1  A: 

<font style="font-family:courier;color:white;background-color:black;">white text goes here</font>

Note:I tried to post it formatted, but SO doesn't appear to accept font tags.

Edit: You can find this stuff out for yourself by going to http://www.w3schools.com.

atk
+1  A: 

You should use a StyleSheet for that. Example:

var theCSS:String = ".normaltext{color:#FFFF00;font-family:Courier}.highlightedtext{color:#FFFF00;font-family:Arial}";
var theStyle:StyleSheet = new StyleSheet();
theStyle.parseCSS(theCSS);
theTextArea.styleSheet = theStyle;
theTextArea.htmlText = '<span class="normaltext">Normal text here, and</span><span class="highlightedtext"> the highlighted text here</span>';
Jorge