Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- Drupal 5.9
- Wysiwyg 5.x-0.2
- TinyMCE 2.1.3
- Added g2image to sites\all\modules\wysiwyg\tinymce\jscripts\tiny_mce\plugins\g2image
- 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, ),
- g2image showed up under buttons and I enabled it for my editor profile.
- 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?
Comments
Comment #1
sunThe 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.
Comment #2
steveoliver CreditAttribution: steveoliver commentedYes, sun, IMCE is a Drupal contrib module. No, g2image isn't.
Comment #3
sunRegarding 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.
Comment #4
steveoliver CreditAttribution: steveoliver commentedI 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, href="http://drupal.org/node/241753#comment-792305">#241753: Integrate tinyMCE better with IMCE which recommended adding a template.php function (for TinyMCE standalone, not TinyMCE as editor for WYSIWYG):
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?
Comment #5
sunI'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.
Comment #6
sunI'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.
Comment #7
dkruglyak CreditAttribution: dkruglyak commentedI see that #320562 has been fixed. So what would it take now to enable TinyMCE Spellcheck plugin?
Comment #8
sun@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.
Comment #9
sunSorry, #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
Comment #10
iva2k CreditAttribution: iva2k commentedJust to let people know - I've created Wysiwyg SpellCheck module that enables TinyMCE spellchecker plugin. It may be just what you need.
Comment #11
Ron Collins CreditAttribution: Ron Collins commentedthanks. that was just what i needed. this was the final piece needed to get private files working with tinymce, IMCE and spell checking.
Comment #12
xolotl CreditAttribution: xolotl commentedI 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
Then configure the necessary input formats in your drupal site's wysiwyg administration screen to enable the spell check button.
Comment #13
BeatnikDude CreditAttribution: BeatnikDude commented@ xolotl
Thanks, works great, I needed this.
Previously the TinyMCE spellcheck plugin worked as per TinyMCE documentation when added without a fix.
I agree I don't think adding another module is the way to go, especially when you then move the TinyMCE spellcheck library to a location other than the location documented within TinyMCE. It seems that this should be integrated into the module in support of the TinyMCE editor.
Comment #14
sunComment #15
bramface CreditAttribution: bramface commentedYou've got a stray semicolon:
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker;',
should be
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
Comment #16
attheshow CreditAttribution: attheshow commentedSubscribing. Would love to be able to use spellchecker plugin without having to add an extra module or hacking this one.
Comment #17
AdrianB CreditAttribution: AdrianB commentedSubscribing.
Comment #18
BeatnikDude CreditAttribution: BeatnikDude commentedI would suggest that the title of this thread reflect the issue, not the proposed solution.
Comment #19
BigMike CreditAttribution: BigMike commentedThank you very much xolotl!
Comment #20
Russell Mann CreditAttribution: Russell Mann commentedThis solution works. Spent a lot of time on this and think this should already be in the tinymce.inc. The other editor inc's already have them in, why can't this be fixed and standard? Any ideas?
Comment #21
paskainos CreditAttribution: paskainos commentedThank you xolotl for sharing. I agree with @Russell Mann. Spell checker is very arguably core functionality in a WYSIWYG editor. And since TinyMCE ships with spell checker, rolling it in gets my vote.
I realize this issue probably isn't the best place to make this case, but I'm making it here because of the other interest here on this, and because it's where xolotl's workaround is located.
Comment #22
TwoDTinyMCE does not ship with the spellchecker(s) mentioned here. It does have a plugin which can be used with some serverside backends but it needs to be downloaded separately: http://tinymce.oxiecode.com/wiki.php/Plugin:spellchecker
This issue is for plugins in general, so let's not put too much focus on spellcheckers here. ;)
Comment #23
paskainos CreditAttribution: paskainos commented@TwoD: thanks for pointing out the clarification (spellchecker is a plugin). One slight correction, the spellchecker plugin does ship with TinyMCE (since ca. 2007). And I agree, this isn't the place to put too much emphasis on spellchecker. But to your point about 'plugins in general', as previously stated spellchecker is arguably core functionality in a WYSIWYG environment. Therefore, if plugins like Word count are rolled in, then why not spellchecker? I think in that context, the spellchecker dialogue fits here, in conjunction with your remark about plugins in general.
I think perhaps we're talking semantics here, or maybe splitting hairs. But the point is, with most clients expecting spellchecker functionality as much as any other WYSIWYG plugin, a few lines of code makes much more sense than several modules.
Comment #24
TwoDYes, the clientside part of the spellchecker plugin is included, but not the serverside backend. From what we could tell by the documentation such a backend was required and it was necessary to modify config files manually to get it up and running. Hence the current lack of support for the TinyMCE spellchecker plugin. The wordcount plugin had no such requirements.
So thats one reason for not supporting some plugins in "Wysiwyg core", even if they are shipped with the editor. We don't like to require manual configuration, so if nobody's been able to create a GUI to do [most of] the configuration required to make a plugin work, we don't want to take on the responsibility of being first line of support. The editor-specific communities are much better at that. I'm hoping to be able to put some work into #313497: Allow configuration of advanced editor settings very soon. That would contribute a lot to actually being able to create editor-specific GUIs and increasing the level of support for several plugins.
To follow up on the spellchecker:
I took a look at the code in that plugin just now, and it seems there's a fallback to the browser's native spellchecker (if any) for non-IE browsers. If IE is detected, users are asked to install the ieSpell browser extension.
I think that would be enough for officially supporting this plugin (in its default non-backend mode) with Wysiwyg.
It's already possible to enable the native spellchecker in Gecko browsers via hook_wysiwyg_editor_settings_alter() and gecko_spellcheck. It looks like that when the plugin is in "native" mode it will toggle the same functionality acvtivated by the setting and make sure the editor's own context menu stays out of the way.
If there isn't already a feature request for that specific plugin would you mind creating one?
An alternative would be to include support for it within the [badly needed] cleanup/corrections discussed in #970452: Fix TinyMCE plugin names and remove outdated plugin information.
Comment #25
paskainos CreditAttribution: paskainos commented@TwoD: I think your (alternative) proposal to roll this in to #970452: Fix TinyMCE plugin names and remove outdated plugin information is an excellent idea! It seems like a perfect fit, and it gets my vote. In response to your latest post over there I vote we roll this in.
Comment #26
W32 CreditAttribution: W32 commentedI added code to initialize the tinymce plugin "Spellchecker" in file "tinymce.inc", turn-on it on the Wysiwyg profile page, but the button on the tinymce toolbar does not appear. Why?
Conf: Drupal7, TinyMCE 3.4.3.2, Wysiwyg-last
added code:
Comment #27
drzraf CreditAttribution: drzraf commented[edit, didn't read correctly]