Add wysiwyg_external_plugins module

steveoliver - July 25, 2008 - 21:47
Project:Wysiwyg
Version:6.x-2.x-dev
Component:Plugins
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description
  • Drupal 5.9
  • Wysiwyg 5.x-0.2
  • TinyMCE 2.1.3
  1. Added g2image to sites\all\modules\wysiwyg\tinymce\jscripts\tiny_mce\plugins\g2image
  2. Added g2image to wysiwyg_editors.plugins.inc:
            'g2image' => array(
              'path' => $path_editor .'/plugins/g2image',
              'buttons' => array('g2image' => t('Gallery 2 Image')),
              'url' => 'http://g2image.steffensenfamily.com/index.php?title=Main_Page',
              'internal' => TRUE,
              'load' => TRUE,
            ),
  3. g2image showed up under buttons and I enabled it for my editor profile.
  4. But g2image button doesn't show up in TinyMCE.

I'm also wondering how to get IMCE working with the standard TinyMCE insert/edit image button.

Any ideas?

#1

sun - July 25, 2008 - 23:06
Category:bug report» support request
Status:active» postponed (maintainer needs more info)

The one and only question in advance: Are both editor plugins provided by Drupal contrib modules? I know IMCE, but I don't know that "g2image" thingy.

#2

steveoliver - July 29, 2008 - 17:14

Yes, sun, IMCE is a Drupal contrib module. No, g2image isn't.

#3

sun - July 29, 2008 - 23:48
Title:Issue with Wysiwyg Plugins» Add wysiwyg_external_plugins module
Version:5.x-0.2» 5.x-1.x-dev
Category:support request» feature request
Status:postponed (maintainer needs more info)» postponed

Regarding IMCE, see #287025: IMCE_Wysiwyg API bridge module

For g2image and other plugins, I really think someone should create a separate module for the Wysiwyg project that implements hook_wysiwyg_plugin() for a bunch of (external) editor plugins that are not related to Drupal modules. That would be a relatively time-consuming task, because for each of them, one has to check the license (perhaps consult the author) and update it when a new version appears. Of course, as the API evolves, all hook implementations might need to be updated the other day, and I certainly do not only think of plugins for TinyMCE here. This module could live inside the Wysiwyg package, so all users would benefit from it.

If someone wants to step in and take over this part, feel free to leave me a message.

#4

steveoliver - July 30, 2008 - 18:48

I do understand what you are saying about a module for external plugins - I think that will become necessary. I may be able to commission that work by a programmer I work with. I will point him to this thread if he is available and have him contact you to move forward.

Regarding IMCE, I followed your link to #287025: Wysiwyg Editor support (which seemed to have no follow-up support) to another post, #241753: Integrate tinyMCE better with IMCE which recommended adding a template.php function (for TinyMCE standalone, not TinyMCE as editor for WYSIWYG):

<?php
function phptemplate_tinymce_theme($init, $textarea_name,

$theme_name, $is_running) {
  static
$access, $integrated;

  if (!isset(
$access)) {
   
$access = function_exists('imce_access') && imce_access();
  }

 
$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);

  if (
$init && $access) {
   
$init['file_browser_callback'] = 'imceImageBrowser';
    if (!isset(
$integrated)) {
     
$integrated = TRUE;
     
drupal_add_js("function imceImageBrowser(fid, url, type, win) {
        win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}"
, 'inline');
     }
  }

  return
$init;
}
?>

This did not work to enable the IMCE button in TinyMCE for WYSIWYG. I'm not sure what you wanted me to see about post #287025. Were you recommending the function above? Or something else?

#5

sun - July 30, 2008 - 19:53

I've pointed you to the existing IMCE issue to keep different topics separated, and replied over there. This issue should focus on external editor plugins only.

#6

sun - May 16, 2009 - 19:31
Version:5.x-1.x-dev» 6.x-2.x-dev
Component:Wysiwyg Editor» Plugins

I'm interested in solving the larger issue - supporting externally distributed/hosted editor plugins in externally ditributed/hosted editor libraries.

#320562: Libraries API contains more valuable info around this topic.

It boils down to 1 wrapper module for all kind of external plugins, I guess.

#7

dkruglyak - May 18, 2009 - 06:33
Status:postponed» needs work

I see that #320562 has been fixed. So what would it take now to enable TinyMCE Spellcheck plugin?

#8

sun - May 18, 2009 - 13:58
Status:needs work» postponed

@dkruglyak: This issue is about editor plugins that are neither shipped with the editor, nor provided by a Drupal module. Instead, it's about completely optional, externally hosted editor plugins.

#328252: Handle compatibility of internal plugins via plugin API (also) talks about TinyMCE's spellchecker plugin and I believe that's what you want.

#9

sun - May 18, 2009 - 22:33

Sorry, #466168: Patch to enable spellchecker plugin in TinyMCE clarified that the spellchecker plugin is somehow special. The basic plugin is shipped with the editor, but you additionally need to download server-side PHP scripts and put them into the plugin's directory to make it work.

http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker

#10

iva2k - May 31, 2009 - 03:07

Just to let people know - I've created Wysiwyg SpellCheck module that enables TinyMCE spellchecker plugin. It may be just what you need.

#11

peggys mouse - June 4, 2009 - 21:26

thanks. that was just what i needed. this was the final piece needed to get private files working with tinymce, IMCE and spell checking.

#12

xolotl - November 1, 2009 - 20:39

I didn't really want to install another module just to enable spellchecking in tinymce (v. 3.2.5), so I got it working by doing the following. I didn't really see this info stated clearly anywhere, so I'm putting it here in case it helps someone else. You may find it easier to use the wysiwyg_spellcheck module to accomplish the same thing.

Replace the standard spellchecker plugin at sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/spellchecker with the latest downloaded from tinymce (v 2.0.2) at http://tinymce.moxiecode.com/download.php.

Then add the following reference to that plugin in the wysiwyg module (v 6.x-2.0) at about line 520 of sites/all/modules/wysiwyg/editors/tinymce.inc

'spellchecker' => array(
    'path' => $editor['library path'] . '/plugins/spellchecker',
    'buttons' => array('spellchecker' => t('Spell Check')),
    'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker';,
    'internal' => TRUE,
    'load' => TRUE,
),

Then configure the necessary input formats in your drupal site's wysiwyg administration screen to enable the spell check button.

 
 

Drupal is a registered trademark of Dries Buytaert.