title: tinymce react - clear editor content
body: <p>I am using tinymce editor in my project. The code is as follows.</p>
  
  <pre><code>&lt;Editor
                                initialValue={selectedDocument.html_content}
                                init={{
                                  plugins: 'link image code',
                                  toolbar: 'undo redo | bold italic | alignleft aligncenter alignright | code',
                                  height: 600
                                }}
                                onChange={this.handleEditorChange}
                              /&gt;
  </code></pre>
  
  <p>To clear the editor i used the following code</p>
  
  <pre><code>clearEditorContent = () =&gt; {
      let documentDetails = {...this.state.documentDetails};
      documentDetails['html_content']  = '';
      this.setState({documentDetails});
    }
  
  
  
   handleEditorChange = (e) =&gt; {
      let htmlContent = e.target.getBody().innerHTML;
      this.setDocumentDetails('html_content', htmlContent)
    }
  </code></pre>
  
  <p>But this clearEditorContent method somehow triggers the handleEditorChangeMethod and again sets the html_content</p>
  
  <p>(<strong>content is still there in the editor and so e.target.getBody().innerHTML sets html_content again</strong>).</p>
  
  <p>Any idea on what is wrong here?</p>
  
  <p>Also, is there any alternate approach to clear the editor content?</p>