Index: tinymce.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/tinymce/tinymce.module,v retrieving revision 1.92.2.3 diff -u -r1.92.2.3 tinymce.module --- tinymce.module 31 Mar 2008 16:22:21 -0000 1.92.2.3 +++ tinymce.module 14 Jul 2008 02:27:02 -0000 @@ -225,6 +225,10 @@ // if tinymce filemanager is installed drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/plugins/filemanager/jscripts/mcfilemanager.js'); } + // Add integration with IMCE if available. + if (module_exists('imce') && imce_access()) { + drupal_add_js("function mceImageBrowser(fid, url, type, win) { win.open(Drupal.settings.basePath + '?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760, height=560, resizable=1'); }", 'inline'); + } // TinyMCE Compressor 1.0.9 and greater if (file_exists($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js')) { drupal_add_js($tinymce_mod_path .'/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js'); @@ -520,6 +524,10 @@ // we probably need more security than this $init['file_browser_callback'] = "mcImageManager.filebrowserCallBack"; } + // Add support for IMCE if available. + if (module_exists('imce') && imce_access()) { + $init['file_browser_callback'] = 'mceImageBrowser'; + } if ($init['theme'] == 'advanced') { $init['plugins'] = array();