I would like to add a colored wiggly underline to certain text fragments of a <textarea>
element. The effect would be similar to that of spell checkers.
How can I do this with javascript, possibly with the help of jquery?
The only control I have over the html markup is through javascript. My first thought was to add styles to those text fragments, but as far as I know, one can only style the entire textarea element, not individual text fragments.
I know what I am trying to achieve is possible, as there is commercial software achieving a similar effect, but I'm still trying to figure out what are the tricks involved.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…