Descubre nuestros Web Maintenance Plans
  +34 644 672 289 ¿Website down?   Contact  4.7 / 5

Web Development

Tiny MCE ImageManager. Insert Uploaded Images Automatically

I am talking about:

Uploading and inserting images using ImageManager (TinyMCE plugin) in 3 clicks, instead of 4 and without search for your uploaded images inside the image file list. Images will be inserted in tinyMCE’s textarea automatically.

Ninja solution:

line 528: imagemanager-path/pages/im/js/imagemanager.js . Look for “onupload : function(){”

onupload : function(e) {
 if (e.files.length > 0 ){
  var s = t.currentWin.getArgs();selectedPaths=[];
  $(e.files).each(function(i, v) {
    selectedPaths.push(v.path); });
    relative_urls : s.relative_urls,
    document_base_url : s.document_base_url,
    default_base_url : s.default_base_url,
    no_host : s.remove_script_host || s.no_host,
    paths : selectedPaths,
    progress_message : $.translate("{#common.image_data}"),
    insert_filter : s.insert_filter,
    oninsert : function(o) {
      if (s.oninsert) {
        $(o.files).each(function(i, v) {
                t.focusedFile = v; o.focusedFile = v; s.oninsert(o);
  }); // end RPC.exec
} // end if
} // end onupload


Note: function(e){
Paste this code inside your onupload:function(){
That’s it.

Problems of this solution
– It’s not a plugin, so if you update your imagemanger, you will have to make this change again.
– If you don’t allow overwrite files, if you try to upload a file that is allready uploaded, this file won’t be uploaded neither inserted in tinymce’s textarea.
– Not tested on IE, just chrome,safari and firefox.

Two days ago, I would payed for this code. I Hope this will be usefull for you.

    ¿How can we help you?

    We are at your service, please write us a message, we'll get back to you quickly.


    Muy profesionales. Resuelven rápido e informan en todo momento del estado del trabajo. 100% recomendado.

    Conchetta Alonso

    CEO at Workcation

    4.7/5 Leer opiniones sobre Php Ninja en Google reviews

    ¿Cómo podemos ayudarte?

    Solicitar Presupuesto Contratar plan Contacto

    +34 644 672 289 (Lu-Vi, Whatsapp 24h)


    What have our clients said?

    • 5 star review  The company made a very good work for me. Very professional team, rapidly done, and we had a good feedback during the duties. The team has a high expertise with php. I do recommend them.

      thumb Vicente Celada Gonzalez

      5 star review  He trabajado y seguiré trabajando con ellos. Son profesionales, solucionadores y atentos. Me han realizado desde la reparación y optimización de la web hasta un cambio de servidor.

      thumb Oscar Robledo

      5 star review  Good treatment, speed, efficiency ... great professionals !!. We came from bad experiences with so-called experts, which only made us lose money and time. And instead, they have performed a Malware cleanup in record time for the dates that are. Of course, it has been a success to find such a serious and efficient company. Special mention to Marc, for his excellent customer service. We will repeat and recommend them. Greetings.

      thumb Clibema instaladores y lampistas
    • 5 star review  Very good job! When they started to think that fixing our website was mission impossible we found PhpNinja, great professionals. Very good attention and service! Web ready!

      thumb Equànima Coaching Equinoteràpia Ecoturisme

      5 star review  Soluciones rápidas y efectivas. ¡100% recomendable!

      thumb Jonatan Murcia

      5 star review  The service was fast and professional. Besides being very friendly. Thank you very much and I highly recommend it!

      thumb Carlos Aguilar

    Tiny MCE ImageManager. Insert Uploaded Images Automatically

    Te respondemos rápidamente. Sin compromiso

      Recibir asistencia

    Php Ninja

    icono whatsapp programador web