I like to know how to clear the Summernote. Here is a link to bootstrap Summernote
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.
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.
Share Improve this question edited May 10, 2015 at 19:12 user2314737 29.3k20 gold badges107 silver badges121 bronze badges asked May 10, 2015 at 19:09 maxlkmaxlk 1,0576 gold badges18 silver badges35 bronze badges 2- MAybe this similar question will help stackoverflow.com/questions/26425342/… – user2314737 Commented May 10, 2015 at 19:16
- Great it work. Thank you. Can you added as the answer so i can mark it as the correct answer? – maxlk Commented May 10, 2015 at 19:28
4 Answers
Reset to default 19You 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
As user2314737 pointed out on the link below code work
$('#MyForm').code('');
Worked for me, only put below jquery code.
$('#ControlId').code('');
Here ControlId is the id of the summernote editor.
Reset
To Clear the editor content and remove all stored history.
$('#summernote').summernote('reset');