title: Initializing tinymce-rails-image-upload using tinymce-rails
body: <p>I'm trying to set up image uploading using the <a href="https://github.com/PerfectlyNormal/tinymce-rails-imageupload" rel="nofollow">tinymce-image-upload</a> gem and the <a href="https://github.com/spohlenz/tinymce-rails" rel="nofollow">tinymce-rails</a> gem. I'm having trouble with one of the steps in the tinymce-image-upload setup:</p>
  
  <p><strong>Set up TinyMCE as you would normally, but in the call to .tinymce(), add</strong></p>
  
  <pre><code>plugins: "uploadimage"
  #toolbar option must include "uploadimage" somewhere to have the button appear
  </code></pre>
  
  <p>Since I'm using tinymce-rails I have </p>
  
  <pre><code>&lt;%= tinymce %&gt;
  </code></pre>
  
  <p>at the bottom of the view to initialize tinymce. However, I'm not sure how to add:</p>
  
  <pre><code>plugins: "uploadimage"
  </code></pre>
  
  <p>In the <a href="https://github.com/PerfectlyNormal/tinymce-rails-imageupload-demo/" rel="nofollow">demo</a> it is added in the javascript like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $("document:ready", function() {
   $("[rel=tinymce]").tinymce({
    theme: "modern",
    toolbar:    "bold,italic,underline,|,bullist,numlist,outdent,indent,|,undo,redo,|,pastetext,pasteword,selectall,|,uploadimage",
    pagebreak_separator: "&lt;p class='page-separator'&gt;&amp;nbsp;&lt;/p&gt;",
    plugins: ["uploadimage"],
    relative_urls: false,
    remove_script_host: false,
    document_base_url: (!window.location.origin ? window.location.protocol + "//" + window.location.host : window.location.origin) + "/",
     })
   });
  &lt;/script&gt;
  </code></pre>