title: CKEditor instance in a jQuery dialog
body: <p>I am using jQuery to open a dialog window with a textarea transformed into an instance of CKEditor. I'm using the jQuery adapter provided by the CKEditor team but when the dialog window opens up I cannot interact with the editor (it's created but "null" is written in the content space and I can't click on anything or modify the content).</p>
  
  <p><a href="http://dev.jqueryui.com/ticket/4727" rel="noreferrer">This bug report</a> seems to say that by using a patch provided the issue is fixed but it doesn't seem to be working for me...</p>
  
  <p>Here's my code (maybe I did something wrong programmatically):</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="ad_div" title="Analyse documentaire"&gt;
  &lt;textarea id="ad_content" name="ad_content"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My includes (Everything is included correctly but maybe it's an including order issue?):</p>
  
  <pre><code>&lt;script type="text/javascript" src="includes/ckeditor/ckeditor.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" type="text/css" href="includes/jquery/css/custom-theme/jquery-ui-1.7.2.custom.css" /&gt;
  &lt;script type="text/javascript" src="includes/jquery/js/jquery-1.3.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="includes/jquery/js/jquery-ui-1.7.2.custom.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="includes/jquery/plugins/dialog-patch.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="includes/ckeditor/adapters/jquery.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$('#ad_content').ckeditor();
  
  /* snip */
  
  $('#ad_div').dialog(
  {
      modal: true,
      resizable: false,
      draggable: false,
      position: ['center','center'],
      width: 600,
      height: 500,
      hide: 'slide',
      show: 'slide',
      closeOnEscape: true,
      autoOpen: false
  });
  
  $('.analyse_cell').click(function(){
      $('#ad_div').dialog('open');
  });
  </code></pre>
  
  <p>Edit: After some further testing I noticed that pressing on the toolbar buttons gave me this error:</p>
  
  <blockquote>
    <p>Error: this.document.getWindow().$ is
    undefined Source File:
    includes/ckeditor/ckeditor.js Line: 82</p>
  </blockquote>