01 TinyMCE ASpell Installation 1. Installation TinyMCE is the editor control used by WoodWing’s Web Editor and the text editor of WoodWing's Content Station. It handles the typed text, but also offers spelling. By default, Google spelling is used, which requires to have access to the outside world (WAN). For customers who dislike this idea, there is an alternative spelling checker named ASpell. This can be used instead of Google spelling, and does spell checking by itself. Spelling checks are done server side, and so it works in environments that have no access to the outside world (WAN). An ASpell spell-check engine will need to be installed on the same system that has got TinyMCE installed—as part of the Web Editor installation—so that PHP can call the ASpell command for SpellChecker. The installation of ASpell involves performing the following steps: Installation of the ASpell Engine Installation of the ASpell Dictionary Enterprise configuration This document describes how to integrate GNU’s ASpell spell-checker engine in the TinyMCE editor control. Each step is explained in the sections on the following pages. This document applies only to an environment in which Enterprise 6 with TinyMCE 3 is used. For more information about the GNU spell-checker, visit http://aspell.net. For more information about the TinyMCE, visit http:// tinymce.moxiecode.com/ 1 TinyMCE ASpell Installation 1.1.2 Mac OS/Linux Installation 1.1 ASpell Engine Installation The installation of the ASpell engine is different for each operating system, as explained in the following sections. To install the ASpell engine on Mac OS or Linux, do the following: Step 1. Download the ASpell engine installer (file name aspell-0.60.6.tar.gz) by doing the following: 1.1.1 Windows Installation Step 1a. Visit http://aspell.net/. To install the ASpell engine on Windows, do the following: Step 1b. In the Quick Links list, click the link for GNU Aspell 0.60.6. Step 1. Download the ASpell engine installer from http://aspell.net/win32 (file name Aspell0-50-3-3-Setup.exe). Step 2. Extract the downloaded .tar file. Step 3. Open an instance of the Terminal. Step 2. Run the installer and follow the instructions on screen. Step 4. As the root user, navigate to the extract path and type the following command: Step 3. Copy the file aspell-15.dll (the required ASpell library) from the default folder c:\Program Files\ ASpell\bin to the Windows system folder (C:\Windows\System32 or C:\Winnt\System32 respectively). ./configure && make Step 5. To install the program, enter: make install Make sure that the Web Server user (IUSR_machine_name), has access to the cmd.exe file located in C:\Windows\System32 or C:\Winnt\System32 respectively. 2 TinyMCE ASpell Installation 1.2.2 Mac OS/Linux Installation 1.2 ASpell Dictionary Installation The installation of the ASpell dictionary is different for each operating system, as explained in the following sections. To install the ASpell dictionary on Mac OS or Linux, do the following: Step 1. Download the required ASpell dictionary installer from ftp://ftp.gnu.org/gnu/aspell/ dict/0index.html. 1.2.1 Windows Installation Step 2. Extract the downloaded .tar file. To install the ASpell Engine on Windows, do the following: Step 3. Open an instance of the Terminal. Step 1. Download the required ASpell dictionary installer from http://aspell.net/win32. Step 4. As the root user, navigate to the extract path and type the following command: Step 2. Run the installer and follow the instructions on screen. ./configure && make Step 5. To install the program, enter: Install the dictionary to the same path as the path of the ASpell engine. make install Step 3. Restart the server after having installed both the Aspell engine and dictionary. 3 TinyMCE ASpell Installation 2. Enterprise Configuration Windows In order for the TinyMCE controls in the WoodWing applications to work properly with the ASpell spell-checker, two configuration needs to be configured in the Enterprise system: the general configserver.php file and the spellcheck config.php file. Windows with Apache & WAMP configserver.php c:\wamp\www\Enterprise\config config.php Both files can be found at the following location: c:\wamp\www\Enterprise\server\ tinymce3\jscripts\tiny_mce\plugins\ spellchecker Mac OS configserver.php Linux /Library/WebServer/Documents/Enterprise/config config.php configserver.php /Library/WebServer/Documents/Enterprise/server/ tinymce3/jscripts/tiny_mce/plugins/spellchecker /var/www/html/Enterprise/config config.php /var/www/html/Enterprise/server/tinymce3/jscripts/ tiny_mce/plugins/spellchecker Windows Windows with IIS configserver.php To edit either file, open it in a standard text editor such as Notepad, TextEdit or TextWrangler. c:\inetpub\wwwroot\Enterprise\config config.php When editing the files, always use forward slashes ‘/’ as path separators and make sure to keep the correct PHP syntax. c:\inetpub\wwwroot\Enterprise\server\ tinymce3\jscripts\tiny_mce\plugins\ spellchecker Windows with Apache 2 configserver.php C:\Program Files\Apache Group\Apache2\ htdocs\Enterprise\config config.php C:\Program Files\Apache Group\Apache2\ htdocs\Enterprise\server\tinymce3\jscripts\ tiny_mce\plugins\spellchecker 4 TinyMCE ASpell Installation 2.2 Configuration in SpellCheck config.php 2.1 Configuration in configserver.php In the configserver.php file, add a new feature to the list of SERVERFEATURES: Two lines need to be changed in the SpellCheck config.php file: Windows new Feature( 'WebEditorSpellingEngine', 'ASpell') In situations where this feature does not exist, the system will apply the default SpellingEngine (GoogleSpell). O n line 35, set the variable $config['PSpellShell.aspell'] to the installation of Aspell application. For example: $config['PSpellShell.aspell'] = 'c:/Progra~1/ASpell/bin/aspell. exe'; The ~ is required for any file path containing spaces so that PHP can access that path. On line 36, set the variable $con- fig['PSp ellShell.t m p'] to the temporary folder. For example: $config['PSpellShell.tmp'] = 'c:/ temp'; Make sure that the Web Server user (IUSR_machine_name), has access to C:/temp. 5 TinyMCE ASpell Installation Mac OS / Linux 3. Troubleshooting On line 40, set the variable $con- Issue: Message appears ‘No misspellings found.’ when using the English dictionary, even though words are clearly spelled wrong. For example: $config['PSpellShell.aspell'] = '/usr/local/bin/aspell'; Please make sure of the following: fig['PSpellShell.aspell'] to the installation of Aspell application. Ensure that the ASpell engine has been cor- rectly installed (see section 1.1 ASpell Engine Installation.) Check the installation path; default C:\ Program Files\ASpell (Windows) or /usr/local/ bin/ASpell (Mac OS/Linux) Ensure that the ASpell dictionary has been correctly installed (see section 1.2 ASpell Dictionary Installation.) Check the installation path; default C:\ Program Files\ASpell\Dict (Windows) or /usr/ local/bin/lib/aspell-0.60 (Mac OS/Linux) Make sure that the Web Server user (IUSR_ machine_name), has access to the cmd.exe file located in C:\Windows\System32 or C:\Winnt\ System32 respectively. Make sure that the Web Server user (IUSR_ machine_name), has access to the c:/temp folder. Make sure that the configuration in Enterprise (configserver.php and config.php files) has been done correctly. On line 41, set the variable $con- fig['PSp ellShell.t m p'] to the temporary folder. For example: $config['PSpellShell.tmp'] = '/ tmp'; 6