Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2002
    Location
    Washington State
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Specific Colored Text in a TextArea....

    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.


    ~Isaac~
    ~ Isaac Lloyd ~
    Website Design & Development
    http://www.IsaacLloyd.com

  • #2
    New Coder
    Join Date
    Jul 2005
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 {
    background-color:#FF0000;
    color:#FFFFFF;
    }

  • #3
    New Coder
    Join Date
    Dec 2002
    Location
    Washington State
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, Thanks...
    ~ Isaac Lloyd ~
    Website Design & Development
    http://www.IsaacLloyd.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •