In a form after submitting all fields get cleared other than the TEXTAREA. I use summernote for textarea. (using bootstrap)
<script type='text/javascript'>//<![CDATA[
$(function(){
$('#description').summernote({height: 500});
});//]]>
</script>
#description
is the id of the textarea.
reset done like below
<script>
$('#submit-box')[0].reset();
</script>
#submit-box
is the id of the form
$('#description').code('');
see http://hackerwins.github.io/summernote/features.html#api-code
Updated
Since summernote v0.6.4+(maybe), the API has breaking changes.
$('#description').summernote('code', '');
http://summernote.org/getting-started/#get-amp-set-code
another way :
$('#description').summernote('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