Search code examples
phpjavascriptjquerywysiwygtext-editor

tinyMCE - how to handle image uploads


I have a site where people post news, it is written in PHP.

Up to now, people who post stories had a textarea for the text input, and a form field to upload an image for the story.

Now I am upgrading the site, and I am considering giving people more flexibility, so I plan to use a javascript WYSIWYG text editor.

After reviewing the most popoular, or at least the ones I found googling, I think tinyMCE is the best documented and thats why I think I'm going to go with it, though I've just worked with it for around 4-5 hours, so I don't really care if I'll have to switch to another editor.

When you drag-drop images in the textarea, tinyMCE encodes the image in base64 and uses it as the src attribute for the image tag.

I was wondering, is there a way to make tinyMCE upload the images to the server as files so that I can handle them with php (make thumbnails, name and store them as I wish)?

If not, is there an editor where that would be an option?


Solution

  • There is another plugin for tiny mce which is free and open source. You can use this
    http://justboil.me/tinymce-images-plugin/