I can get the image uploaded in IMCE but whe I click send to text area nothing is uploaded. Any suggestions?
Thanks

Comments

JuJu_Kelly’s picture

Status: Active » Closed (fixed)
eff_shaped’s picture

I had same problem. But found a work-around.

Try inserting image with rich-text disabled (ie, while you are seeing the html).

sadashiv’s picture

I was also facing the same problem.

The end user may not be knowing this that he/she needs to disable rich text to add a image or link so i implemented the following code as a workaround

function MYMODULE_NAME_form_alter(&$form, &$form_state, $form_id) {
    if($form_id == 'imce_fileop_form'){
        drupal_add_js('$(document).ready(function(){
                                $(document).blur(function(){
                       if($("#op-content-upload").css("display") == "none")
                                       window.close();
                                  });
                                });','inline');
    }
    if($form_id== NAME_OF_MY_FORM) {
        drupal_add_js('$(document).ready(function(){
                                $(".imce-inline-image").click(function(){
                                if($("#edit-body").css("display") == "none") { 
                                            $("#wysiwyg-toggle-edit-body").click();
                                 }
                                 });

                                 $(".imce-inline-link").click(function(){
                                 if($("#edit-body").css("display") == "none"){
                                        $("#wysiwyg-toggle-edit-body").click();
                                 }
                               });

                               $("#edit-body").focus(function(){
                               $("#wysiwyg-toggle-edit-body").click();
                         });
                         });','inline');
    }

Note: This code will work only for create node form and need to change the id instead of "edit-body" to make it work for different forms