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