This content has been marked as final. Show 3 replies
Not sure exactly what you mean, but textarea has an htmlText property that can work with a subset of html-ish tags. Otherwise, if you are talking about editing, then you should take a look at the RichTextEditor component.
Lets say I have some text in the text area. Can I change the color of one word in the text area or could I underline a word?
You should be able to do that by setting the htmlText as mentioned. If you meant for the user to be allowed to edit the text, you would be better off using RichTExtEditor and hiding the control bars for instance, as I imagine as soon as the user edited the TextArea you might lose the underlines, tho I'm not sure.
If for some reason you absolutely have to use TextArea, then you can probably accomplish what you want by detecting the change event on the TextArea and reapplying the formatting as needed.
Say you are writing a word processor with dictionary underlining for misspelled words: You would allow the user to type their text, and then after each letter typed, you could look for changes and apply the underline as needed. But using RichTextEditor seems like it would be a lot easier.