I have a \'template\' selector, that enables people to change the \'text/html\' of the current textarea.
So when they change templates, I need to update the Summernote H
If you don't want to replace all the content from the note, you can use the insertHTML command from the execCommand WebAPI.
As summernote is based on the execCommand WebAPI, we can use directly its resources.
So the most simple way to add a HTML content to the summernote can be using the insertHtml
parameter like this:
document.execCommand('insertHtml', null, 'My text here
');