Summernote content coming with html tags

Shweta M picture Shweta M · Mar 27, 2015 · Viewed 17.2k times · Source

I am new to summernote text editor. I am trying to get the proper content from the summernote textarea, which infact coming with html tags. I tried

    <textarea class="summernote" id="summernote"  ng-model="blog.content" ></textarea>

in my html page and getting the textarea content with,

     $("#summernote").code();

it is fetching the content in html tags. I want the content to be displayed without the html tags.

Thank you for the advice.

Answer

user4710450 picture user4710450 · Mar 27, 2015

Use val() to get all what entered in textarea or text, So :

var content = $("#summernote").val()