title: Reset CKEditor5 form
body: <p>Sorry if this has been discussed before, but I have searched exhaustively and only found solutions to the older version, not 5. I want to have two buttons for my forms, SEND and RESET. When someone clicks on the reset button I want the form to be clear of all input. I know in the older version I could have done the following:</p>
  
  <pre><code>CKEDITOR.instances['#editor'].setData('');
  </code></pre>
  
  <p>But this doesn't work with version 5. So I tried </p>
  
  <pre><code>$("#reset").click(function() {
       $('.ck-editor__editable').html( '' );
  });
  </code></pre>
  
  <p>This works and clears up the form. But the problem is the data that just cleared reappears as soon as you click back on the form after clearing it. Please see below for the full code.</p>
  
  <p>Thank you in advance for your help</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;CKEditor 5 - Classic editor&lt;/title&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;style&gt;
  .ck-editor__editable {
      min-height: 200px;
  }
  &lt;/style&gt;
      &lt;h1&gt;Classic editor&lt;/h1&gt;
      &lt;textarea name="content" id="editor"&gt;&lt;/textarea&gt;
   &lt;button id="getdata"&gt;Print data&lt;/button&gt;
   &lt;button id="reset"&gt;Reset data&lt;/button&gt;
   &lt;div&gt;
    &lt;p&gt;The Textarea output goes here&lt;/p&gt;
    &lt;div class="form-output"&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdn.ckeditor.com/ckeditor5/1.0.0-beta.2/classic/ckeditor.js"&gt;&lt;/script&gt;
      &lt;script&gt;
  
  $(function(){
  let theEditor;
  
  ClassicEditor
      .create( document.querySelector( '#editor' ) , {
     toolbar: [ 'heading', '|' , 'bold', 'italic', 'underline', 'bulletedList', 'numberedList', 'blockQuote', 'alignment', 'link', 'undo', 'redo', '' ],
     heading: {
      options: [
       { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
       { model: 'heading2', view: 'h2', title: 'Heading', class: 'ck-heading_heading2' },
       { model: 'heading3', view: 'h3', title: 'Sub Heading', class: 'ck-heading_heading3' }
      ]
     }
    })
      .then( editor =&gt; {
          theEditor = editor; // Save for later use.
      } )
      .catch( error =&gt; {
          console.error( error );
      } );
  
  function getDataFromTheEditor() {
      return theEditor.getData();
  }
  
  document.getElementById( 'getdata' ).addEventListener( 'click', () =&gt; {
   form_data = getDataFromTheEditor();
      //alert( form_data );
  } );
    showData = $('#getdata');
    showData.click(function(){
     $(document).ready(function() {
      $('.form-output').html( form_data );
     });
    });
    
    $("#reset").click(function() {
     $('.ck-editor__editable').html( '' );
    });  
  });
  &lt;/script&gt;
   
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>