title: Get tinyMce mode to activate on a new textbox inserted by AJAX (in Rails)
body: <p>I have a nested attribute (speeches) under a model Speaker and I'm using tinyMce to let a speaker fill out a profile form where they might have one or more speeches they give.</p>
  
  <p>I'm using the Rails 2.3 nested attributes helpers as used in Ryan Bates's complex-form-example github account.</p>
  
  <p>The tinyMce functionality is great for a "Speech" if it's loaded by the page, but not active for a new "Speech" loaded by AJAX on "Add new speech" (calls a insert_fields script to add the form fields)</p>
  
  <p>The tinyMce code on the page is</p>
  
  <pre><code>&lt;script src="/javascripts/tiny_mce/tiny_mce_src.js?1254270151" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  //&lt;![CDATA[
  tinyMCE.init({
  editor_selector : 'mceEditor',
  language : 'en',
  mode : 'textareas',
  theme : 'simple'
  
  });
  //]]&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>And to activate a textarea form field, you put class="mceEditor" on it.</p>
  
  <p>Is there a way to activate tinyMce on the new Ajax inserted form fields?</p>
  
  <p>TinyMce plugin: <a href="http://github.com/kete/tiny_mce" rel="nofollow noreferrer">http://github.com/kete/tiny_mce</a> </p>