0
votes

I'm using TinyMCE with great results, the only problem now is that using the autosave plugin and after submitting a form, when I try to create a new record the draft for the last submitted form gets loaded. I've spent some hours looking for a solution without success so, if anyone knows how can I clear the draft after submitting (or onSubmit, or something) I'd be very grateful.

Thanks!

1

1 Answers

0
votes

Would the following help?

<script>
$('#myForm').submit(function(e) {
  e.preventDefault();

  // clear tinymce contents
  tinyMCE.activeEditor.setContent('');
});
</script>