tinyMCE - how to handle image uploads

ppp picture ppp · Jun 20, 2012 · Viewed 42.5k times · Source

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?

Answer

Milad Safaei picture Milad Safaei · Jun 10, 2015

I recommend "Responsive File Manager"

Which is a free open-source file manager and image manager made with the jQuery library, CSS3, PHP and HTML5 that offers a nice and elegant way to upload and insert files, images and videos.

enter image description here

GREAT FEATURES :

  1. Upload files with a simple drag & drop.
  2. Use as stand-alone file manager, as TinyMCE, CKEditor or CLEditor plugin or as crossdomain.
  3. Many customisation parameters such as Automatic resizing of uploaded images, Optional limiting of image dimensions, Files allowed lists.
  4. Full preview of uploaded images, videos and audios.
  5. Automatic creation of thumbnails and Automatic realignment of thumbnails after external changes

and ...