Curious problem. I need to empty a <textarea>
then replace it with other content. The tests in the JSFiddle will work if nothing is manually typed, but as soon as anything is entered in the textarea by hand, the methods will cease to work.
I understand that I can simply just .val('New stuff here')
, however I need HTML entities such as >
and <
to appear as <
and >
, which .val() will not accomplish.