I like to know how to clear the Summernote. Here is a link to bootstrap Summernote
http://summernote.org
I try using
$('#MyForm').delay(1000).resetForm(1000);
And
$('#MyForm').trigger("reset");
Also i tried
$('#SummernoteTxt').val('');
1st two codes rest the whole form correctly but doesn't seems to clear the Summernote editor. Can anyone point me how to do this.
If you look on the main Summernote website as opposed to the API docs you will see a clear example, that explains how to customise the toolbar. It is on the Deep Dive page and scroll down to Custom Toolbar. It also lists the available toolbar buttons. In your toolbar you set ['style', ['bold', 'italic',...
html(text). text(); . Because if you the content of summernote contain some plain text and you don't wrap the whole content inside an HTML tag(like div) then, jQuery will through an error saying it was not expected.
The Summernote Editor is a free & open-source super simple WYSIWYG editor based on Bootstrap & jQuery. It is a JavaScript library that can be useful to build the WYSIWYG editors online.
You can clear contents with code
.
$('#summernote').summernote('code', '');
You can also clear all stored history, with reset
after v0.7.3.
$('#summernote').summernote('reset');
Fore more details... http://summernote.org/deep-dive/#reset
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With