title: CKEDITOR.replace() is hiding the textarea that I want converted
body: <p>I'm using Javascript to create a textarea that I want to be a ckeditor. My code is something like</p>
  
  <pre><code>var html = '&lt;textarea name="text"&gt;&lt;/textarea&gt;';
  $('#mydiv').append(html);  
  var textareas = document.getElementsByTagName('textarea');  
  // Could be more than one textarea   
  for (i = 0; i&lt;textareas.lenght; i++) {  
      var textarea = textareas[i];  
      CKEDITOR.replace(textarea.name); 
  }
  </code></pre>
  
  <p>When I run this code and check the output the textarea is hidden. Inspecting it in firebug I'm getting a style="visibilty:hidden". However removing this just gives me a textarea and not a ckeditor. Does anyone have any suggestions on how to solve it.</p>
  
  <p>Putting it as a div worked but the examples all seemed to be in textareas.</p>