Good afternoon. What happens that I want to get a text string with HTML tags, but the summernote interprets them and shows the rich text, and what I want is to show the text with tags, but I have not succeeded:
var content = '
Content and
tags and
HTML';
//I have tried this:
$('#summernote').summernote('code',content);
$('#summernote').val(content);
But the result is this: Content and tags and HTML
What I want is to copy and paste a text that contains HTML tags, but I do not want the summernote to interpret those tags. What I want, is that the user can see the tags when pasting that text without activating the mode 'code view'
var content = '
Content and
tags and
HTML';
//Initialize the summernote
$('#summernote').summernote({
height: 200
});
$('#summernote').summernote('code',content);
Run code snippetExpand snippet
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)