Extra module uploaded in FCKeditor plugin folder does not show up (or if shows up does not show up in the actual text editor) Buttons and plugins admin area of Wysiwyg.
Wysiwyg version used http://ftp.drupal.org/files/projects/wysiwyg-6.x-2.0.tar.gz
Drupal version 6.15
The readme file of this FCKeditor plugin (http://www.vishalon.net/IndicResources/IndicIME.aspx) says
Plugin Installation:
1. Unzip the file on your local hard disk.
2. Upload "indicime" folder to FCKEditor_ROOT/plugins/
3. In the fckconfig.js file write "FCKConfig.Plugins.Add( 'indicime' );" and in ToolbarSets initialization add "indicime" and "indicimehelp" button for language dropdown list and help button
However following the steps, no luck.
Steps followed
FCKConfig.Plugins.Add( ‘indicime’ );
FCKConfig.ToolbarSets["Default"] = [
['indicime','indicimehelp'],added the above in …\sites\all\libraries\fckeditor\fckconfig.js, taking care where to end lines with or without comas
This however did not show up the module and had to add
‘indicime’ => array(
‘path’ => $editor['library path'] . ‘/editor/plugins’,
‘extensions’ => array(
‘indicime’ => t(’indicime’),
),
‘internal’ => TRUE,
‘load’ => TRUE,
), ( no idea if this was the thing to do)
in …\sites\all\modules\wysiwyg\editors\fckeditor.inc
This shows the module in the admin area but buttons are not seen by the user.
Comments
Comment #1
twodSince Wysiwyg module allows you to enable/disable buttons and plugins using a GUI on the server it needs to have full control over some settings, like those which needs customization when installing native editor plugins. A goal of Wysiwyg module is to aliminate/minimize the changes in files belonging to either the editor library or the Wysiwyg module itself. This will allow for much easier upgrades since there is no need to keep track of manual changes between versions.
To make Wysiwyg module aware of each external native plugin - so it can correctly assemble the lists of buttons and plugins to load - you create a very small module which implements hook_wysiwyg_plugin(). You can of course put this hook into any existing module as well. Details on how this hook is implemented is described in wysiwyg.api.php (the version in 6-x.2.x-dev is up to date) The hook allows you to specify the script file to load, which buttons it has (or 'extensions' if it has no buttons), and override default editor settings.
Bottom line, having to modify library files (including config files) is something we want to avoid in favor of a GUI so non-coders can configure the editors as well. A coder does have to write the initial hook implementation, but that can be shared with and reused by everyone else so it only has to be done once. We're not there yet when it comes to the actual GUI, but that is to be fixed with Wysiwyg 3.x where the hook implementations will also be able to extend the GUI/profile form.
Comment #2
kaakuu commentedThanks TwoD, I am trying to understand what I am supposed. And should I discard the present version and install the dev ?
People will need one or two extra FCK (or TinyMCE) module every now and then and Wysiwyg, to be even experimentally successful and to have a beginning step to wide adoption this procedure (of adding plugins) need to be very easy and somewhat non-geeky like not having to handle api files.
Comment #3
twodYou can use the 2.0 version, it has the same capabilities to handle plugins for FCKeditor, but the documentation is better in the -dev.
Basically, you create a small custom module which only has the purpose of telling Wysiwyg module where the plugin file can be found, which buttons it has and what settings it uses. No other file modifications are required for most plugins. Without this information, there is no way for Wysiwyg module to let you enable the plugin under 'Buttons and plugins' on the profile page.
In the .module file you put a hook implementation like this: