View Full Version : Specific Colored Text in a TextArea....

07-13-2005, 11:59 PM
I am trying to make a text area where anything that begins with "<" until it reaches a ">" is colored green. As you can guess I am using a textarea to edit text files on a website and want the SCRIPT part to be green and the normal stuff black. I think there should be a way to read through the textarea and color parts of the text. I've seen it in HtmlArea text editors but havn't been able to figure out how they do it. Any comments or suggestions would greatly be appreciated. Thanks for your time.


07-14-2005, 01:07 AM
The HTML textarea does not support multiple colours, so you cannot do this using conventional HTML and javascript I believe. You could try searching on the internet for a java applet that has support for this, for example the java class JTextPane allows multiple colours.

The only properties of the textarea you can change using standard HTML are the background and foreground colours which can be set using CSS.

.exampleclassname {

07-14-2005, 01:10 AM
Ok, Thanks...