Index: INSTALL.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/img_assist/INSTALL.txt,v retrieving revision 1.16 diff -u -r1.16 INSTALL.txt --- INSTALL.txt 6 Apr 2008 16:43:18 -0000 1.16 +++ INSTALL.txt 30 Jun 2008 08:45:30 -0000 @@ -6,7 +6,7 @@ * Image module -* TinyMCE module (optional) +* Wysiwyg Editor module (optional) -- PRE-REQUISITES -- @@ -59,32 +59,7 @@ want your users to be able to easily choose images from their galleries, select for example "Acidfree albums" as the vocabulary to use for Image assist. - --- TINYMCE PLUGIN INSTALLATION -- - -If you use the TinyMCE WYSIWYG editor, you need to install a plugin for Image -Assist. - -* Move or copy the folder 'drupalimage' in the img_assist directory to - - [sites/all/]modules/tinymce/tinymce/jscripts/tiny_mce/plugins/ - - Edit the file plugin_reg.php in the tinymce directory. It's located in: - - [sites/all/]modules/tinymce/plugin_reg.php - - Add the following lines anywhere above the 'return' statement (without the - tags): - - $plugins['drupalimage'] = array(); - $plugins['drupalimage']['theme_advanced_buttons1'] = array('drupalimage'); - $plugins['drupalimage']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|width|height|align|name]'); - - - Next, go to - - Administer > Site configuration > TinyMCE - - and enable the drupalimage plugin in your TinyMCE profile. +* If Wysiwyg Editor module is installed, you need to edit your Wysiwyg profile + configuration and enable the plugin for Image Assist. Index: README.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/img_assist/README.txt,v retrieving revision 1.15 diff -u -r1.15 README.txt --- README.txt 15 Apr 2008 20:12:06 -0000 1.15 +++ README.txt 30 Jun 2008 08:45:30 -0000 @@ -20,7 +20,7 @@ Read this after installing the module. -* Using this module with TinyMCE: +* Using this module with TinyMCE, provided by Wysiwyg Editor module: 1. Click the camera icon on the TinyMCE toolbar. 2. Upload a new photo or choose an existing image. 3. Set the properties for how you want the image to display. @@ -40,7 +40,7 @@ Users with the 'access img_assist' permission will see the 'add image' link or icon (configurable). Access to img_assist via the TinyMCE plugin is - controlled by the TinyMCE module. + controlled by the Wysiwyg Editor module. Users with the 'create images' permission will be able to upload images using img_assist. All users will be able to see and insert their own pictures, even @@ -86,16 +86,6 @@ See http://drupal.org/patch/apply for further information. --- FAQ -- - -Q: After installing Image Assist plugin for TinyMCE, the plugin does not show up - in TinyMCE's list of "Buttons and Plugins"? - -A: Unfortunately, TinyMCE module comes with two folders named 'plugins'. Please - ensure that you have copied Image Assist's drupalimage plugin into the folder - [sites/all]/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/ - - -- CONTACT -- Current maintainers: Index: img_assist.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/img_assist/img_assist.module,v retrieving revision 1.75 diff -u -r1.75 img_assist.module --- img_assist.module 29 Jun 2008 23:05:48 -0000 1.75 +++ img_assist.module 30 Jun 2008 08:45:31 -0000 @@ -150,6 +150,10 @@ * Add image link underneath textareas. */ function img_assist_textarea($element) { + // FAPI #wysiwyg support. + if (isset($element['#wysiwyg']) && $element['#wysiwyg']) { + return $element; + } $link = variable_get('img_assist_link', 'icon'); if (($link == 'icon') || ($link == 'text')) { if (_img_assist_textarea_match($element['#id']) && _img_assist_page_match() && !strstr($_GET['q'], 'img_assist')) { @@ -497,7 +501,7 @@ $path = drupal_get_path('module', 'img_assist'); $output .= ''."\n"; if ($editor == 'tinymce') { - $tinymce_path = drupal_get_path('module', 'tinymce'); + $tinymce_path = drupal_get_path('module', 'wysiwyg_editor'); $tinymce_js = base_path() . $tinymce_path .'/tinymce/jscripts/tiny_mce/tiny_mce_popup.js'; $output .= '' . "\n"; } @@ -1773,6 +1777,23 @@ */ /** + * Implementation of hook_wysiwyg_plugin(). + */ +function img_assist_wysiwyg_plugin($editor) { + switch ($editor) { + case 'tinymce': + return array( + 'drupalimage' => array( + 'path' => drupal_get_path('module', 'img_assist') .'/drupalimage', + 'buttons' => array('drupalimage' => t('Image Assist')), + 'url' => 'http://drupal.org/project/img_assist', + 'extended_valid_elements' => array('img[class|src|border=0|alt|title|width|height|align|name]'), + ), + ); + } +} + +/** * @defgroup img_assist_legacy Image Assist Legacy functions * @{ * Used for backwards compatibility with original img_assist module. Index: drupalimage/editor_plugin.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/img_assist/drupalimage/editor_plugin.js,v retrieving revision 1.3 diff -u -r1.3 editor_plugin.js --- drupalimage/editor_plugin.js 6 Apr 2008 16:43:19 -0000 1.3 +++ drupalimage/editor_plugin.js 30 Jun 2008 08:45:31 -0000 @@ -15,7 +15,7 @@ initInstance : function(inst) { if (!tinyMCE.settings['drupalimage_skip_plugin_css']) - tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + '/plugins/drupalimage/drupalimage.css'); + tinyMCE.importCSS(inst.getDoc(), this.baseURL + '/drupalimage.css'); }, getControlHTML : function(cn) { Index: drupalimage/editor_plugin_src.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/img_assist/drupalimage/editor_plugin_src.js,v retrieving revision 1.3 diff -u -r1.3 editor_plugin_src.js --- drupalimage/editor_plugin_src.js 6 Apr 2008 16:43:19 -0000 1.3 +++ drupalimage/editor_plugin_src.js 30 Jun 2008 08:45:31 -0000 @@ -15,7 +15,7 @@ initInstance : function(inst) { if (!tinyMCE.settings['drupalimage_skip_plugin_css']) - tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + '/plugins/drupalimage/drupalimage.css'); + tinyMCE.importCSS(inst.getDoc(), this.baseURL + '/drupalimage.css'); }, getControlHTML : function(cn) {