How to clear text in Summernote on submit?


Anybody who knows how to clear the text in the Summernote editor when submit function is return false?

I have set my application to stay on the same page when submitting the form, and as a result the text entered in Summernote editor stays there after submit.

Here’s my template event

"submit .message-text": function(event) {
// Prevent default browser form submit

// Get value from form element
var text = $('#summernote').code();
var title =;
var username = Meteor.userId();
var chatroom =;
// Insert a task into the collection

  text: text,
  title: title,
  chatRoom: chatroom,
  createdBy: username,
  createdAt: new Date() // current time
// Clear form = "";

Summernote is rendered in <div id="summernote"></div>


I figured it out, it was simply to set the value of the div id: