Reputation: 43
I am loading user input back into summernote for editing, both top and bottom get extra lines added on. Is there a way to fix it?
$('#summernote').summernote('editor.pasteHTML', "<p>hello world</p>");
comes out
"
hello world
"
instead of "hello world"
Upvotes: 3
Views: 1125
Reputation: 11
I ran into the same problem. If you're trying to initialize the editor with html, try doing $('#summernote').summernote('code', "<p>hello world</p>");
instead. The $('#summernote').summernote('code', markupString);
is for setting the html directly.
Upvotes: 1