#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    2
    Rep Power
    0
    Hi!

    Is there a way to format text entered in a textbox?

    I'd like to implement some kind of form with text editor functions like buttons for "bold", "italic", ... to be able to highlight important parts of the text entered.
    And, most important, it has to work in IE AND in Netscape...
    Any ideas?

    Thanx,
    someone
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,647
    Rep Power
    4493
    This would be better with java, probably. the text box just shows plain text, you can't do anything with it. you could implement some kind of ubb similar code like here on devshed use [] codes. you could possibly have it interactive a little with javascript. the user highlights a word, pushes a B button, and the javascript adds the <b> tags? i don't think this is what you're after though....

    ---John Holmes...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    2
    Rep Power
    0
    The problem is that as far as I know you can't get the cursor position in a textbox, nor the position of any highlighted text with JavaScript. With JavaScript you can only add text at the beginning or at the end of the text, not somewhere in between.

    Ciao,
    someone

IMN logo majestic logo threadwatch logo seochat tools logo