I am new to summernote text editor. I am trying to get the correct content from summernote textarea that appears using html tags. I tried
<textarea class="summernote" id="summernote" ng-model="blog.content" ></textarea>
on my html page and getting the textarea content with
$("#summernote").code();
it displays content in html tags. I want the content to be displayed without html tags.
Thanks for the advice.
After a long search, think, instead of trying to use the value of the opennote summernote text editor, why not try with the angular filter. So I searched and got a filter that definitely does what I need.
, .
angularjs html
$(). text() .
$("<div />").html($("#summernote").code()).text();
Use val () to get everything that was entered in textarea or text, So:
var content = $("#summernote").val()
I had the same problem, “fixed” it using version 0.6.16 instead of the current stable version 0.7. HTML is now perfectly processed without additional js code.