Reputation: 1057
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.
Upvotes: 9
Views: 16718
Reputation: 5535
To Clear the editor content and remove all stored history.
$('#summernote').summernote('reset');
Upvotes: 1
Reputation: 1289
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
Upvotes: 19
Reputation: 3013
Worked for me, only put below jquery code.
$('#ControlId').code('');
Here ControlId is the id of the summernote editor.
Upvotes: 2
Reputation: 1057
As user2314737 pointed out on the link below code work
$('#MyForm').code('');
Upvotes: 2