How can I create an html input text area such that I can underline or format certain words?
问题 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