After Wysiwyg API update to 6.x-2.0, Image Assist lost its button in the editor. It is still enabled in the profile, but does not show on the toolbar. Also, existing img_assist tags are not converted in the editor, and show in raw form.

Comments

iva2k’s picture

Since I encountered exactly the same problem in my modules wysiwyg_asciimath and wysiwyg_spellcheck, I tried the same fix and resolved it for myself.

The following line needs to be added to img_assist_wysiwyg_plugin():

            'load' => TRUE,

So it will look like this:

function img_assist_wysiwyg_plugin($editor, $version) {
  switch ($editor) {
    case 'tinymce':
      if ($version > 3) {
        return array(
          'img_assist' => array(
            'path' => drupal_get_path('module', 'img_assist') .'/drupalimage/editor_plugin.js',
            'buttons' => array('img_assist' => 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|style]'),
            'load' => TRUE,
          ),
        );
      }
      break;
  }
}

Since it's a one-liner, I think making a patch is not necessary.

sun’s picture

Status: Active » Fixed

Thanks for reporting, reviewing, and testing! Committed to all 2.x branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

davidcardwell77’s picture

Ok I solved this problem sort of.
I reverted to the previous version of wysiwyg, the revoked one.
I know its revoked and insecure and all that but........ it works.
my clients FREAKIN LOVE IT when they can put images in their own pages.
this one isnt really concerned with security.
so based on your need for functionality vs security just revert to the old version of wysiwyg and your camera icon should reappear.
hopefully someone will come up with a real solution soon.

kae006’s picture

Plus one on iva2k Solution.

sun’s picture

This has been already fixed in latest development snapshot. No need to follow up in this issue, you just download the latest development snapshot.

davidcardwell77’s picture

latest snapshop of which module, I just got the snapshot released on 06 22 09 and I still have the option in the wysiwyg / tinymce settings, but the icon does not appear in the wysiwyg panel.

davidcardwell77’s picture

I cant seem to find this file, could you tell me which file this code goes in and where it is located please

Cheers
Dave

iva2k’s picture

img_assist 6.x-3.x-dev (2009-Jun-13) works for me out of the box with Wysiwyg API 6.x-2.x-dev (2009-Jun-22). It does not have img_assist_wysiwyg_plugin() function anymore, and no edit is necessary.

@davidcardwell77:
img_assist_wysiwyg_plugin() function was in img_assist.module 6.x-2.0-alpha3, but it is not relevant to the latest Wysiwyg API. Use "Choose which module versions to use" link on Wysiwyg API to sort out your module versions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.