Search code examples
javascriptjspfile-uploadtinymcewysiwyg

Uploading image from local into TinyMCE?


I am using TinyMCE. It works great. But I want the feature in TinyMCE where a user can upload the images from local box/or from public websites.

I am using Tomcat, JSP and core Java. I found couple of free third party libraries like ibrowser, imanager, jbimages etc but all of them using PHP which looks like does not fit in my existing project (I don't know PHP but I tried to integrate one of these in my existing project they don't work and give some weird errors). Really I am not sure how to have this feature in TinyMCE (if some other editor support it with JSPs I can try that)?

I looked for similar question on the internet, but every third party is using PHP and I am using JSP not PHP.


Solution

  • I'm maintaining tinymce-rails-imageupload, which provides a plugin for letting TinyMCE upload images from the users machine.

    Now, this is meant to be used with Rails, but it should not require too much modifications to work with something else. Or at the very least, you can use the JavaScript/HTML as a basis for your own plugin that integrates nicely with a Java-backend.

    My plugin also doesn't handle the storage of the images, and leaves that up to the backend. In Rails, this would be done with CarrierWave or Paperclip, and I'm sure some similar projects exist in the Java world.

    I know this isn't really a solution per se, but it can hopefully be used as a starting point.