title: CKEditor - destroy an instance when the DOM node has been deleted
body: <p>Reading through the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#destroy" rel="noreferrer">CKEditor documentation</a>, I see that they have an option to destroy an instance with <code>CKEDITOR.instances.instanceName.destroy();</code>. However, if the DOM has changed, and the whole WYSIWYG DOM structure has been removed, I get the following error in Chrome:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'document' of null
  </code></pre>
  
  <p>...and the following one in Firefox:</p>
  
  <pre><code>i.contentWindow is null
  </code></pre>
  
  <p>Is there any way to work around this?</p>
  
  <p>Due to the way my app is structured (loading content via AJAX), I cannot call <code>.destroy()</code> when the elements are still on the page.</p>