views:

26

answers:

0

I'd like an input field that I can have javascript set certain attributes for, for different parts of the input field. A simple example to demonstrate what I'd like to do: let's say I want to underline all curse words in an input text area. So the javascript would check the input text area when a new letter is inserted, and for any words matching my array of recognized curse words, it would underline the word. Note, I do not want the user/client to be able to set any attributes of the text, I simply want the javascript to be able to format certain words differently than others (so, no toolbars or anything like that). I also want the box to look exactly like a regular text area in every other regard.

I'm already aware of some rich text editors (like juju editor and lwrte) as well as some syntax highlighters but I'm not sure if they do what I want.

So, anyone know of a tool that would let me do this?

Thanks