WordPress Plugin: Visual.SpellCheck
Current Version: 0.95
I don't use the WYSIWYG Editor that comes with WordPress 2.0, and as a result have been getting extremely frustrated with the lack of a spell-checker. So I decided to try and get one working, preferably using AJAX to make it as fast and user-friendly as possible.
I am now proud to present Visual.SpellCheck – an AJAX-based Spell Checker for WordPress. It includes the ability to:
- Highlight incorrectly spelled words
- List suggested words from the aspell dictionary
- List suggested words from your custom dictionary
- Allow new words to be added to your Custom Dictionary
The Spell Checker works in Firefox, Internet Explorer, Opera and Safari.
Demo
Here is a demo of Visual.SpellCheck. It should work fine in Mozilla browsers (including Firefox) and Internet Explorer. It will also function in Opera, although there are some small issues. Follow the instructions in the textarea itself, and feel free to edit it's contents and then test.
Installation
Follow these basic steps:
- Download this file: Visual.SpellCheck.zip (37Kb)
- Unzip the file on your computer.
- Upload the complete folder "Visual.SpellCheck" to your WordPress plugins directory (found in "/wp-content/plugins")
- Login to WordPress and go to the Plugins module
- Find the line that says "Visual.SpellCheck" and click "Activate"
- Change the permissions on the file Visual.Syntax/personal_dictionary/dict.txt" to "757″ so that the server can write to the file
Note: Pspell must be installed on the server for this to work. Also this plugin is not compatible with the WYSIWYG HTML Editor that comes with WordPress (TinyMCE comes with its own spellchecker anyway). You will have to disable the WYSIWYG and be using the old-style editor (textarea).
Credits
This project is based on code from Broken-Notebook. Thanks to Garrison who has modified his original code to allow the plugin to integrate with WordPress and minimise issues with future compatibility.
Known Minor Bugs
This is the only bug I am aware of – and it is pretty minor:
- In Opera the popup menu that shows the suggested words always sits top-left of the textarea
If you are able to help with this that would be great.
ChangeLog
2006-02-04 - Firefox QuickTags conflict fixed. Now version 0.95 2006-02-04 - Public release of version 0.90
If you liked this plugin you can digg it here or please leave a comment.

February 5th, 2006 at 6:22 am
[...] Here’s a new Ajax-based spell checker for WordPress that uses Pspell on the back end. Doesn’t work in the RTE, just in the textarea. [...]
February 5th, 2006 at 5:07 pm
Too amazing dude. I love. Infact I’ve recommended WP.com to have this as well. Could you tell as to how exactly you made this. It’s the best spell-check plugin I’ve seen so far. Already blogged about this and have posted this in WP Forums as well. You should post this in the Plugin Database and the Codex.
http://wordpress.com/forums/topic.php?id=488&replies=1
February 5th, 2006 at 5:15 pm
[...] Called Visual Spell Check, this is made fully using AJAX. It’s clean, light, uber-fast and very user-friendly. It automatically checks the text for mistakes and highlights it and once you click there, correct words are suggest. Here is the URL.. Moreover, you can [...]
February 6th, 2006 at 4:38 pm
Discovered this through Asymptomatic. Works great on my site.
Thanks for a great plugin.
February 6th, 2006 at 4:51 pm
Thanks for the feedback guys. Look for an update in the next week or so to try and make this bug-free for all users…
February 7th, 2006 at 12:12 am
Excellent and I’ve posted about this in the WP forums.. The response is that if this could work for the WYSWYG editor, then definitely this can be added to WP.com. Would be a great credit to you if you could work on that. .
Cheers and all the best!
February 8th, 2006 at 11:11 am
Excellent!
February 12th, 2006 at 6:18 am
Instead of refreshing the field when adding a word to the personal dictionary, why not just unhighlight that one word throughout the page? Seems like that would be quicker…
February 12th, 2006 at 12:09 pm
I was looking for a non-wysiwyg spell checker for wordpress 2 and this one looks really nice.
But i get a few notices when i try to spell check, i think it is because i use error_reporting E_ALL on my server’s php.ini setup.
I think you should fix these notices, there are only 4 or 5 i think and it would make the plugin even better for us E_ALL coders
Other than that, thanks for the nice spell checker.
Greets.
ved
February 21st, 2006 at 7:50 pm
Is there a way to get it to work on Write Pages too. Right now it only works on Write Posts. Great Plugin though.
Sean
February 25th, 2006 at 3:19 am
[...] Visual.SpellCheck is an AJAX-powered plugin to check your spelling in WordPress. [...]
February 25th, 2006 at 3:09 pm
Matthew, I am running WordPress 2.0.1 on IIS6. I have Aspell up and working using the Spelling Checker plugin by Brian “ColdForged†Dupuis. I have set define(‘ASPELL_BIN’,'D:\Aspell\bin\aspell.exe’); in spell_checker.php but I am getting this error:
Fatal error: Cannot access empty property in c:\Inetpub\wwwroot\wordpress\wp-content\plugins\Visual.SpellCheck\pspell_comp.php on line 131
Any help you could give me would be greatly appreciated.
-john
February 26th, 2006 at 3:08 am
Matt,
Thanks for making this available. Ajax is awesome.
Ulysses
March 1st, 2006 at 2:16 am
[...] http://matthew.delmarters.com/weblog/visual_spellcheck/ [...]
March 1st, 2006 at 2:49 pm
How do I get Aspell to work? I have the files?
March 2nd, 2006 at 12:28 pm
will it work with 1.5 or is it limited to 2 – (hoping)
March 4th, 2006 at 9:39 am
Is there a way to make this work on pages as well as posts? The Check Spelling link shows up when writing posts, but not when writing pages.
March 4th, 2006 at 11:23 am
[...] However, there seems to be a problem with the Visual.SpellCheck plug-in and Safari. When I check my spelling, the plug-in strips the HTML markup out of my post. The bug is not really a problem because Safari can spell check text areas without any special plug-ins. So from what I can tell, Safari nightly build plus Wordpress minus Visual.SpellCheck works great. [...]
March 5th, 2006 at 7:11 pm
Hello
It seems this plug-in strips ‘class’ and ‘alt’ attributes from ‘img’ tags that are in the post. Is this a bug or have I done something wrong?
Other than that it seems to be a great plug-in, thanks for making it.
March 9th, 2006 at 9:07 am
FYI… your demo includes an incorrectly spelled word that is not being detected. actionn with a double n is escaping the spell checker for me…
Also, your comments seem to suggest that the WYSIWYG editor in 2.0 has it’s own spell checking? I’m a new WP user and I’m a bit confounded by that as I can’t seem to find one built in or listed on the Plugins list on the Codex. Could a friendly person out there set me straight on this??? Thanks!
March 22nd, 2006 at 2:18 am
I wish it could work with WYSIWYG editor too…
March 31st, 2006 at 4:37 pm
I would love to see you decide to add this to the WYSIWYG editor in 2.0+. It is a great implementation. There are no plug-ins and WP2.1 could be a bit off in the future.
This post isn’t inspiring I know, but a spell checker would be a great benefit to the world WP.org users. Please consider it.
April 2nd, 2006 at 6:01 am
Nice work.
April 4th, 2006 at 7:37 am
Hi there,
I’d like to say thank you for your awesome plugin.
BTW, your plugin doens’t work when I activated ‘Audio player 1.2.2 ‘ plugin by Martin Laine.
I guess yours have some conflictions with the audio player plugin.
I hope I’m not the only one who bumped into this problem.
Thank you.
April 20th, 2006 at 9:24 am
Fantastic Plugin!
Is there a way to get it to work on Write Pages too, even if it’s a hack, it would make the RTE BS with cut and paste from Word not a problem.
JS
April 21st, 2006 at 9:28 am
I have been looking for something like this for a while… and it seems that all the spell checkers out there are sub par. However there are a few Spell Checker plugins out there that are pretty decent, given whats out there. This seems to be one of the better ones. They will only get better.
It is the most asked for feature right now,.. it is odd that there isnt more chatter.
April 24th, 2006 at 5:38 am
have you tested this with a pspell cgi install? if so, was it too slow to be usable?
April 27th, 2006 at 5:38 am
[...] To get the info just go to Matt’s excellent blog. [...]
May 10th, 2006 at 12:59 am
Any idea where to find other dictionaries (some listed on this page), and how to configure this plugin to use them? I’m interested in the British English one.
Wonderful plugin btw. Uploaded and activated it and it just worked. No complaints.
May 12th, 2006 at 9:55 pm
hi dear
I have seen your ajax based spell checker and i must tell you that its really amazing.
I need some help from you, actually i am developing a mailing client and i have to use a spell checker in that which is something like yours.
Can i use it in Textarea / RTE?
Can you allow me to use it?
Looking for positive response.
Regards,
Sachin Jain
May 14th, 2006 at 5:55 am
I had to make a few modifications to make the spell checker work with Polish (and in general with other non-English languages). Feel free to include these improvements in the future versions of Visual.SpellCheck.
1. In pspell_comp.php, I had to replace
if($this->$jargon){
$this->args .= ‘ –jargon=’.escapeshellarg($jargon);
}
if($this->$encoding){
$this->args .= ‘ –encoding=’.escapeshellarg($encoding);
}
with
if($this->jargon){
$this->args .= ‘ –jargon=’.escapeshellarg($this->jargon);
}
if($this->encoding){
$this->args .= ‘ –encoding=’.escapeshellarg($this->encoding);
}
otherwise PHP would complain with this error message:
PHP Fatal error: Cannot access empty property in /wp-content/plugins/Visual.SpellCheck/pspell_comp.php on line 131
or use an empty string.
2. In spell_checker.php, I had to:
a) replace
$pspell_config = pspell_config_create(“en”);
with
$pspell_config = pspell_config_create(“pl”, null, null, ‘utf-8′);
I think that both language and encoding could be taken from the configuration instead.
b) in spellCheck function replace the regular expression
/[A-Z']{1,16}/i
with
/\pL{1,32}/
to take accented letters into account. Note that \w in place of [A-Z] didn’t work for me and when I tried to add the apostrophe back with /(\pL|’){1,32}/ it didn’t work either. Also I increased the length to take into account some longer words.
c) in remove_word_junk function remove
“\x85″=>”…”,
from the table as \x85 is part of an utf-8 sequence for a Polish character which would get corrupted. I guess str_replace could be replaced with some more intelligent function instead.
May 14th, 2006 at 6:11 am
In fact, I had to do one more modifications in spell_checker.php:
d) replace
if($usePersonalDict){
pspell_config_personal($pspell_config, $path_to_personal_dictionary); // allows the use of a custom dictionary (Thanks to Dylan Thurston for this addition).
}
with
if(function_exists(‘pspell_config_personal’) && $usePersonalDict){
pspell_config_personal($pspell_config, $path_to_personal_dictionary); // allows the use of a custom dictionary (Thanks to Dylan Thurston for this addition).
}
Otherwise, if only aspell is installed, PHP would complain about missing function with this error message:
PHP Fatal error: Call to undefined function pspell_config_personal() in /wp-content/plugins/Visual.SpellCheck/spell_checker.php on line 247
Also, if only aspell is installed, there’s no way to add a word to the dictionary (PHP would complain about missing pspell_add_to_personal function).
And last but not least, the following lines should be moved down a few lines, otherwise there’s no way at all to add a word when there’re no suggestions available:
if($usePersonalDict){
$retVal .= “Add To Dictionary”;
}
May 14th, 2006 at 4:39 pm
Excellent plugin…thanks! A couple things I noticed that could be fixed: (1) If no suggestions are found for a word, then it doesn’t give you the option of adding it to the dictionary and (2) If you correct the spelling for word1 and then add word2 to the dictionary, the correction for word1 is lost and needs to be done again unless you toggle resume editing after each word that gets corrected.
June 9th, 2006 at 12:09 pm
I downloaded your plugin – which seems to integrate into the wordress admin side well enough. However, I have Aspell installed in a directory outsider the htdocs directory. I was wondering where the paths to the aspell binary are defined in the scripts. I’ve changed two ‘path/to/aspell’ in two seperate scripts – but it still throws an error when the spell check is invoked. Can the plugin find binaries defined by absolute drive paths, not relative server paths? Is it easier to reinstall aspell inside the htdocs directory?
I have a feeling I’m probably missing something quite elementary somewhere
June 22nd, 2006 at 11:54 am
[...] Presenting a professional, cohesive and consistent blog is essential to increasing traffic. However, if the majority of your blog posts are completely interwoven with erroneous spelling mistakes, and horrific grammatical errors you are immediately presenting an air of unprofessionalism. Therefore the introduction of the Visual Spellchecker by Matthew Delmater is an excellent AJAX solution which can ensure that your posts are spelling-error free. [...]
July 15th, 2006 at 4:51 pm
Can this work with in the blog comments box too?
July 19th, 2006 at 4:51 am
[...] Visual.SpellCheck an AJAX based spellchecker for the non-WYSIWYG Editor does the job for me – if I’m writing on my site, right now Aspell and Gnome-Blog do the work on my Desktop. [...]
July 21st, 2006 at 7:43 pm
Excellent plugin, thanks for sharing!
July 25th, 2006 at 1:58 pm
[...] From the previous version of my last post, people with even moderate knowledge of English could have easily understood that I suck at spelling ad that, consequently, I did not have a spelling checker installed at this blog. Both of those two conclusions would be true. So I decided to break in and install something to help me and after some mishaps, I settled on Visual Spellcheck plug-in. I am editing my posts in HTML anyway, so lack of WYSIWYG editor support is not critical for me, more like the opposite. All I needed was to install the plug-in, activate it in wordpress, install php5-pspell package and restart Apache. I forgot to restart Apache at first and got a cryptic error from the included fake pspell wrapper. Also aspell and corresponding language libraries must be installed on server site. [...]
July 27th, 2006 at 8:32 am
If I start the spellcheck, correct all errors and then immediatelly press “Save” or “Publish” buttons, changes are not saved. I think that is a bug, because people would not consider returning to editing mode mandatory for appying changes from the spellcheck.
Thanks for the good work!
August 1st, 2006 at 11:42 am
Hello
It seems this plug-in strips ‘class’ and ‘alt’ attributes from ‘img’ tags that are in the post. Is this a bug or have I done something wrong?
Other than that it seems to be a great plug-in, thanks for making it.
++++
I am experiencing the same issue. If we’re not doing anything wrong, is there any chance of an update? Thank you for making a plug-in that I use far more than any other installed on my blog.
August 2nd, 2006 at 2:03 pm
I think it is working, but it is finding EVERY word as misspelled. Am I supposed to download a dictionary file somewhere? It didnt give an error, but could pspell be missing? Thanks for the help. I like your implementation.
August 3rd, 2006 at 8:02 am
[...] Getting a little comfortable with WordPress now. The way plugins work is actually pretty easy. I tried out a whole bunch of standard editor plugins. The reason for this is that the out-of-the-box WordPress does not include spell checking. I tried 5 different ones.Ajax Spell CheckerEditorMonkeyVisual.SpellCheckWYSI-WordpressXinha4WP combined with Text ControlThe last one is the one I am using now. Looks pretty powerful. This is my first post with it. Supposedly, the comments use it too. It looks like I can make the editor fullscreen. Let’s try.Ooooooooooh. That’s nice. Me likey.Ok, all the others looked interesting, but I have to give the nod to Ximha4WP, although they really really need to change their name to something in English. [...]
August 4th, 2006 at 11:30 am
[...] PHP has been recompiled with the pspell libraries, which means users can now use things like Visual Spellcheck for WordPress. [...]
August 5th, 2006 at 7:53 am
I recently installed Visual.SpellCheck for my blog and it works fine in firefox but Internet explorer gives me the javascript error:
Line: 44
Char: 68
Error: Invalid procedure call or argument
Code: 0
URL: http://www.myroms.org/blog/wp-admin/post.php
I am running WordPress 2.0.4. I have modded the files some but I tried the checker on a fresh install and it still didn’t work. The strange thing is that your example on this page works fine in internet explorer. Any ideas?
August 13th, 2006 at 3:25 am
[...] 8. Visual.SpellCheck – AJAX Spell-Checker for my posts. [...]
August 15th, 2006 at 3:47 am
Hi,
I have wordpress 2.0.4 and I’m having trouble with the spell checker. In internet explorer I get an: Error: Invalid procedure call or argument. The line and character number point to httobj.open on line 43 of cpaint2.inc.compressed.js. The really odd thing is that IE works fine with your little example on this page. I even tried downloading the exact cpaint2.inc.compressed.js that you are using on this page but it is identical to the one I have. Firefox works fine, it is only IE that has an error.
Any suggestions?
August 19th, 2006 at 9:58 am
I know you don;’t ssupport it, but where could I find an idiot’s guide to installing ASpell. I just downloaded ASpell as well as the Dictionary I needed, but the installation instructions they provide almost seem as if they exxpect you to be a PhP genuis.
September 17th, 2006 at 2:11 am
Great plugin. I installed it and it was working fine. Now all of a sudden I’m getting this error:
Fatal error: Call to undefined function: pspell_config_personal() in /homepages/8/d104609365/htdocs/savvysolo/wp-content/plugins/Visual.SpellCheck/spell_checker.php on line 58
Any ideas?
Thanks – Michael
September 30th, 2006 at 10:05 am
[...] There are several WordPress spell check plugin i found on the net, but only one that i really like, introducing Visual.SpellCheck by Matthew Delmarter, an AJAX spell checker that function almost like the one in Gmail, but Pspell must be installed on your server in order to use this plugin. [...]
October 1st, 2006 at 9:56 am
[...] For those who use the WordPress plugin Visual.SpellCheck and Sociable, i don’t know whether this happen to you or not, but for me if i enable both plugin i will get this strange problem where the “Check Spelling” in my editor doesn’t show up. [...]
October 15th, 2006 at 2:19 pm
I get this error
br /> Fatal error: Cannot access empty property in /var/www/wp-content/plugins/Visual.SpellCheck/pspell_comp.php on line 131
pspell is installed, permissions on dict.txt changed and I run it on WP2.04 any suggestions?
thx
October 15th, 2006 at 2:23 pm
[...] Just a list of useful and mostly on this site running wordpress plugins Askimet Lightbox 2 Plugin Google Analyticator Google Sitemaps WordPress Database Backup Ultimate Tag Warrior Image Manager Visual.Spellcheck [...]
October 19th, 2006 at 1:53 am
forget it – I solved it somehow..
October 21st, 2006 at 1:22 pm
I installed this plugin on two different WP install (both running brand newest version of WP) and even with Rich editing turned off, the spell check button is not showing up? Is there a possibility that a newer patch may have broken this?
November 8th, 2006 at 2:14 pm
[...] I just upgraded to Wordpress 2.0.5 today. So far so good. While I was at it, I disabled the siFR stuff that gave me fancy headings (provided by the CG-FlashyTitles plugin). It was slowing page-loading time down a lot. I had always noticed the slowdown but didn’t bother to measure it until now. In some cases disabling brought the page-load time down to 5 seconds from 10 seconds. I also disabled the Visual.SpellCheck because Firefox 2.0 has built in spell-checking for text boxes. [...]
December 18th, 2006 at 6:06 am
[...] I just installed the Visual Spell Check comment plugin. When you have 6 readers and commenters, you take real good care of them. [...]
January 26th, 2007 at 7:01 am
[...] Well, I broke down and upgraded to Ella wordpress 2.1. It’s nice. Great to have auto spell check. Now if I can just remember to use it… Also auto save is nice. You know I don’t like the auto spell check in Ella as well as I like my spellcheck plugin. Having a drop down list is nice. [...]
February 16th, 2007 at 9:59 pm
I have installed this plugin in my blog. Its working fine in Firefox browser. But in Internet Explorer when i click “Check Spelling” its taking too much time to check the spelling and not working at all. Please suggest me the cause of the problem and how i can rectify that.
February 17th, 2007 at 12:02 am
I am getting the javascript error “Invalid procedure call or argument” in Internet Explorer browser. So that spell checking is not working. Any help is appreicated.
March 5th, 2007 at 2:03 pm
Anyway this could be adapted so that it words with the comments section?
April 5th, 2007 at 11:34 am
[...] One of the benefits of having PHP5 and pspell is that I get to use cool AJAX wordpress plugins like Visual Spellcheck. If you want to use it, you’ll have to use the more basic wordpress editor instead of the richtext (but I don’t like the richtext version anyway – it creates ugly code.) [...]
April 10th, 2007 at 2:10 am
[...] Spell checking in Wordpress using the non-wysiwyg editor can be achieved using Visual.Spellcheck plugin. The plugin makes use of a spell checker written by Garrison Locke at Broken-Notebook which interfaces with PSPELL. [...]
January 20th, 2008 at 7:19 pm
Awesome plugin! Thanks for making it available.
The only problem I have is saving a word to the dictionary. I have pspell installed on my host and it’s enabled. I also have the permissions set to 757. I still get the “Save Failed” message when adding a word.
Any thoughts. I am running WP 2.3.2
March 11th, 2008 at 2:57 pm
Download link is broken.
March 12th, 2008 at 11:44 pm
Correct download link:
http://matthew.delmarters.com/downloads/Visual.SpellCheck.zip
March 27th, 2008 at 3:46 pm
[...] Visual.SpellCheck [...]
August 20th, 2008 at 5:24 am
Hi there.. will this work with the Apple IPhone 3G? I am looking for a spell check that will function for the email apps on the IPhone.
Thx!
BC-
December 25th, 2009 at 8:19 am
Just a quick note, for my own reference as much as anything.
To make sure this plugin works on Debian the following packages need to be installed:
apt-get install php5-pspell
apt-get install aspell
apt-get install aspell-en