If I were to have a text area on my webpage for users to input text, how would I convert that to show as html on button press and vice versa? I am looking for something like what wordpress would do when the user enters text and then converts it to html OR can write html and convert it to text.
I have tried a few pieces of code so far:
var text_only = $('.snippet').text();
This only displays the html without the tags, this does not render html as expected and the others aren't much better
amend: Please see link for better clarification - http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic_document
thanks
nick