Reputation: 1
So I am pulling content from a Discussion List in Sharepoint and dropping it in RTE text area on a new form. It all works well except that it puts all the content plus all the html tags in the text area and all I want is the text.
How can I remove the html tags without messing up the styling in the text area.
Upvotes: 0
Views: 81
Reputation: 9034
var html = '<div class="blue">This is blue text</div>';
$(html).text(); //will strip the html tags and return only the text.
Upvotes: 3
Reputation: 246
A html textarea does not recognize html tags. You would need a javascript plugin to do that.
Upvotes: 0