Enable TinyMCE spellcheck module
By default there is no spell check available in the Open-Xchange application itself because most of the modern browsers usually offer a spellcheck module. TinyMCE, the HTML editor which is used by Open-Xchange for HTML editing while writing an eMail, offers a wide set of functions and features which can be added to the HTML editor UI. This example will describe how you can enable the TinyMCE based spellcheck functionality within the Open-Xchange mail module.
- An installed Open-Xchange Server
- ASpell with the according dictionaries needs to be installed
- PHP5 must be enabled in your Apache configuration
Enabling the TinyMCE Spellcheck module
Installation of the TinyMCE spellchecker module
Please visit the TinyMCE website and download the latest TinyMCE spellchecker module (at the bottom of the page) at http://tinymce.moxiecode.com/download.php. This article will use the following spellchecker module: http://prdownloads.sourceforge.net/tinymce/tinymce_spellchecker_php_2_0_2.zip?download
Extract the downloaded archive and move the extracted directory "spellchecker" to the TinyMCE location on the Open-Xchange installation:
$ mv spellchecker /var/www/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/.
This can be accomplished by adding a properties file to directory "/opt/open-xchange/etc/groupware/settings".
$ vim /opt/open-xchange/etc/groupware/settings/spellchecker.properties modules/mail/spellcheck=true
Setup the backend communication
Finally we need to tell the spellchecker module which binary it should execute in order to get spelling suggestions. By default GoogleSpell is activated for remote suggestion, but as this would mean that every eMail which should be checked will be send to Google, we recommend to use a local aspell instance for this purpose. To do so, install aspell and the according dictionaries as we told you in the requirements section, and modify /var/www/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/spellchecker/config.php to specify the aspell binary location. Please use the following example, and just replace [REPLACE_WITH_PATH_TO_ASPELL_BIN] with the location of the aspell binary (for example /usr/bin/aspell):
<?php // General settings //$config['general.engine'] = 'GoogleSpell'; //$config['general.engine'] = 'PSpell'; $config['general.engine'] = 'PSpellShell'; //$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php'; // PSpell settings //$config['PSpell.mode'] = PSPELL_FAST; //$config['PSpell.spelling'] = ""; //$config['PSpell.jargon'] = ""; //$config['PSpell.encoding'] = ""; // PSpellShell settings $config['PSpellShell.mode'] = PSPELL_FAST; $config['PSpellShell.aspell'] = '[REPLACE_WITH_PATH_TO_ASPELL_BIN]'; $config['PSpellShell.tmp'] = '/tmp'; // Windows PSpellShell settings //$config['PSpellShell.aspell'] = '"c:\Program Files\Aspell\bin\aspell.exe"'; //$config['PSpellShell.tmp'] = 'c:/temp'; ?>