I'm using IMCE an TinyMCE. IMCE offers an option to set itself as the default file browser in TinyMCE, but this doesn't work properly.
I noticed that IMCE should load 2 JavaScripts while displaying TinyMCE to put a button to be able to access the file browser by the image function.
I don't know why IMCE doesn't put the JSs in the page, but perhaps it may be of interest for other people having the same problem:
To make it running, it's necessary to put some code in "tinymce.module":
1.)
Search the string if (!$is_running) { . It should be somewhere in function tinymce_process_textarea($element).
2.)
Add the following code:
$is_running = TRUE;
$tinymce_mod_path = drupal_get_path('module', 'tinymce');
//And now the changes to make it going
drupal_add_js('var imceBrowserURL = "'.url('imce/browse') .'";', 'inline');
drupal_add_js(drupal_get_path('module', 'imce') .'/imce_set_tinymce.js');
//That's all ^^ ...
Now, while using TinyMCE, the necessary JavaScripts will also be loaded. This should normally be done by IMCE. So It could also be a bug of IMCE.
Comments
Comment #1
keesje commentedHi,
I've exactly the same problem, your fix works, thanks.
I want to add that I have two Drupal sites, one working fine without the fix, the other doesnt. Both the same versions of everything. The one not working is far more complex and uses more other modules. Maybe there is an incompatibility somewhere? Strange ehh..
Comment #2
keesje commentedUpdate: in IE7 still not working after fix?
Comment #3
grandcat commentedThis is very curious. While viewing with IE7, did you use the same user group like in Firefox?
Please take a closer look to the HTML-Code when you view the editor with IE7. Is there any JS entry like the following:
The source file can differ, but it should contain "imce_set_tinymce.js". I also viewed the editor ( + TinyMCE + IMCE + Patch) in my own site with IE7, so please answer the questions above, perhaps this could help to find the problem ;-)
Comment #4
grandcat commentedSorry, I set the wrong category ;-)
Comment #5
grandcat commentedNow, I know why IMCE doesn't integrate right in TinyMCE. Your template needs an old-fashioned include of "$closure". That's all =)
Comment #6
grandcat commentedNow, I know why IMCE doesn't integrate right in TinyMCE. Your template needs an old-fashioned include of "$closure". That's all =)
Comment #7
(not verified) commentedComment #8
visionmark commentedAny other ideas? This doesn't work.
Comment #9
HyperD commentedInstalled TyniMCE, installed IMCE .. TyniMCE neglets IMCE totally... even if I put the code that you suggested here ...