FCKEditor plugin is a very useful plugin for WordPress – no doubt about that. However spell check integration with this plugin takes a bit of hands on if you host your blog from non-Windows OS, and edit your posts with non-Microsoft Internet Browser (IE). Yes, Windows/IE are defaults that FCKEditor plugin comes with.
Below "how to" will guide you step-by-step on integrating spell checking capabilities with FCKEditor. Here I used Ubuntu Linux OS as an example, but these instructions are good for any Linux distro just replace Ubuntu’s "apt-get install" with analog in your Linux OS.
1. First thing first, in order to integrate a spell checker we will NEED a spell checker. For that we will install "aspell", and appropriate (English, in this case) dictionary "aspell-en". There is an 85% percent chance that if you have a Linux OS installed, you have aspell. You can just search for it, or try to run it to see if you do. If you don’t then install it by:
sudo apt-get install aspell
At this point (whether you just installed it or had already installed) try to run it like this:
echo "I mispeled it" | /usr/bin/aspell -a --lang=en_US --encoding=utf-8 -H
If there is no English dictionary installed you should see:
Error: No word lists can be found for the language "en_US".
-bash: echo: write error: Broken pipe
Let’s fix that by installing the dictionary:
sudo apt-get install aspell-en
Now if you run the command above, you should see aspell looking up "mispeled" in its aspell-en dictionary, identifying that it is spelled wrong, and offering you choices of correct spelling from that dictionary:
echo "I mispeled it" | /usr/bin/aspell -a --lang=en_US --encoding=utf-8 -H
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.4)
*
*
*
& mispeled 16 21: misspelled, misapplied, misled, dispelled, misfiled, misruled, mislead, spelled, spieled, misplaced, misplayed, misspell, misfield, misspend, simpled, misplay
Ok, so from Linux side, we are ready with Aspell, now let’s begin the integration.
2. From WordPress FCKEditor’s plugin directory open
"wp-content/plugins/deans_fckeditor/custom_config_js.php" file* and set the following variable:
FCKConfig.SpellChecker = 'SpellerPages';
If you already have this variable set to something different, like "IESpell", just replace it with "SpellerPages"
This will do two things: it will redirect all the spelling requests to
"wp-content/plugins/deans_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php", and, since "spellerchecker.php" exists (comes with plugin) it will enable the spell checker button:
*NOTE: Depending on a version of the plugin, the file to edit might be "fckconfig.js" or "fckconfig_js.php"
3. Almost there. The last thing to do is to tell "SpellerPages" to use Linux’s aspell, since by default it is configured to use it on Windows OS. For that edit
"wp-content/plugins/deans_fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellcheker.php" by setting "$aspell_prog" variable to ‘aspell’ instead of "C:\Program Files\Aspell\bin\aspell.exe". That is what it should look like after you make a change (comment/uncomment):
//$aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows)
$aspell_prog = 'aspell'; // by FredCK (for Linux)
Good job! Now you can login to your WordPress blog and enjoy the spell checking capabilities within your FCKEditor!