March 04, 2003


Movable Type plugin to spell-check entries and comments

Last modified by Alexei Kosut at March 1, 2004 10:01 PM #
Trackback URL:
Post a new comment | Send email | Syndicate this entry (XML)

Comments & TrackBacks

MTSpeling Plugin

Weblog: Tribblescape Info
Tracked: March 18, 2003 06:08 PM

Re: MTSpeling

I am spelng

Posted by: Dylan on March 25, 2003 09:02 PM # | Reply to this


Excerpt: For those of you who've not been leaving comments because the preview feature doesn't work, well, that's no longer an excuse. Now with spell checking!
Weblog: Nothing New
Tracked: March 26, 2003 01:30 PM

Install me post-haste

Excerpt: Note to self: Learn to spell. Or cheat.
Weblog: Gimpysoft
Tracked: April 1, 2003 08:37 AM

Re: MTSpeling

Ok, now thereers some mispellerd words. How do i check it?

Posted by: david on April 1, 2003 11:34 PM # | Reply to this

Re: MTSpeling

this is spelt incorrrectly

Posted by: olly on April 14, 2003 02:11 PM # | Reply to this

Re: MTSpeling

Alexi, thanks for the plugin. I have been using it for a couple of months and it has worked great until I started getting the following error. Nothing has changed in my MT templates or configs, permissions, etc. But I did upgrade to RedHat 7.3 and Perl 5.6.1. I had assumed it was the Perl upgrade causing the problem, but I just cannot track it down.

The error is:
MT::App::CMS=HASH(0x82ad388) Use of uninitialized value in hash element at /home/neil/www/MT/extlib/Lingua/ line 263, line 7.

Unfortunately, this completely stops MTSpeling from working. If you have any ideas how I should continue debugging this I would be grateful - I miss the plugin!


Posted by: Neil on May 18, 2003 07:05 AM # | Reply to this

Re: MTSpeling

Hi Alexei,

This is really a great tool, it helps me a lot! Thank you very much!!
Besides, I am wondering if I can use your css and javascript on my site. This “show misspelled words” checkbox thing is really cool. I also want to make the plugin use a personal dictionary file. Any hint on this?

Best Regards,

Posted by: Yuan-Chung Cheng on May 20, 2003 12:10 AM # | Reply to this

Re: MTSpeling

Sure; the CSS and JavaScript that I use is fairly straightforward, and you’re welcome to borrow it.

As for a personal dictionary, MTSpeling will make use of a dictionary stored in a cookie on the user’s machine (as described on the MTSpeling page). You can use JavaScript to add words to this cookie. Take a look at the JavaScript on my spell-checking previews for an example.

Posted by: Alexei Kosut on May 20, 2003 09:03 AM # | Reply to this

Re: MTSpeling

Thank you very much, and I apologies for the annoying double posting I did yesterday.

Actually, I want to store my personal dictionary on the server so that I can access it anywhere (and somehow the cookie doesn’t work om my system). Therefore, I did a little hack in your plugin code and wrote a CGI to handle the adding of words. The whole bundle including your CSS and JavaScript is here. I can post a detail description about the installation on my Blog is you think it’s ok.

Disclaimer: I am new in blogging and certainly not a good perl programmer; I know my code sucks!

Posted by: Yuan-Chung Cheng on May 20, 2003 01:36 PM # | Reply to this

Re: MTSpeling


Thanks for packaging this. I’ve just added it to my blog and it’s quite handy!

Del Simmons

Posted by: Del Simmons on July 10, 2003 04:30 PM # | Reply to this

Beter Speling

Excerpt: You should be seeing better spelling on this weblog from now on, since I added to my MoveableType installation. Unfortunately, you have to patch MT itself to integrate it, but it was no big deal. There's no way to...
Weblog: jra's thoughts
Tracked: May 25, 2003 01:26 AM

Bugzilla Documentation updates

Excerpt: I think I got the sections of the docs that were outdated updated (mainly the LDAP Auth and charset sections). I haven't recompiled the docs yet so what you see on the website is still the old information. I'll probably...
Weblog: Jake's Weblog
Tracked: July 2, 2003 02:29 PM

add spell-checking in comments

Excerpt: The Speling plugin (yes, the name is misspelled, deliberately) allows you to use the comment preview function for spell-checking. This is not the same as live comment preview. It's the built-in comment preview function that MT has. I don't think...
Weblog: Al-Muhajabah's Movable Type Tips
Tracked: July 6, 2003 12:52 AM

Re: MTSpeling

If you’re installing the Lingua::Ispell module ( in your own extlib folder, you need to create a Lingua folder and place inside there.

That headache cost me 2 hours of grovelin’ ;-p

It’s great after you install it though. Kudos!

Posted by: Aaron on July 8, 2003 04:44 AM # | Reply to this

Re: MTSpeling

Hey Alexei!

First let me say how much I appreciate your work on MTSpeling. It rocks!

I have installed the package that Yuan-Chung Cheng linked to on your comments section, and have gotten it working quite nicely on Blog Entries and on Comment Previews. I’m having one small issue and I’m hoping you might have some idea where I should be looking for a possible fix.

The problem I am having is that my comment body preview never highlights the mispelled words. It doesn’t matter if I’ve set check_spelling to 1 or 2, the mispelled words never show up red, nor do they ever have a tag wrapped around them. It’s almost as if I were putting 0 instead. The mispelled words are found, and the suggestions show up fine, but the words in the actual preview never show up as red.

Any ideas?

If you’d like to see what I’m talking about, in live action, go to:

and preview a comment on any story.

Do you have any thoughts one what to look at? I’m using MT 2.64 and I have the version of MTSpeling that Yuan-Chung Cheng added the support to for storing the custom dictionary on the server side. The mispelled words get marked red properly when I’m previewing a Blog Entry, but not on the comments. You can, of course, see the spelling.css and spelling.js files I’m
using on the server..

Thanks for taking the time to read this and thanks again for MTSpeling!

I did a bit more debugging, while previewing the message, and have a few more clues now..

In, in the line that returns the value $str, after calling check_word in the regex substitute, the proper tags are around the misspelled words, but for some reason that version of the comment body never makes it back out to the browser. I don’t know enough about MT to know where to look to find out why the changes are getting dumped. Any ideas?

Del Simmons

Posted by: Del Simmons on July 10, 2003 05:47 PM # | Reply to this

Re: MTSpeling

I ran into the same problem. After screwing around for about an hour, it dawned on me that MT was probably sanitizing the preview text after the MTSpeling filter added the tags.

The “highlight” tags were retained once I added santize=”0” to the preview comment body tag:

Posted by: Greg Bumgardner on July 12, 2003 11:01 PM # | Reply to this

Re: MTSpeling

I cut and pasted your sanitise tag above into my $MTCommentPreviewBody tag and it didn’t work..

After messing with it a bit I realized you misspelled sanitize!


Just thought I’d post this in case anyone had the same issue..

Thanks so much for the help, Greg! I would have never thought of that!

And for what it’s worth I made my attribute as follows:

sanitize=”span class”

and used that with


Posted by: Del Simmons on July 24, 2003 02:04 PM # | Reply to this

Why Yes, Those Are New Tweaks

Excerpt: I am not in the mood for news right now, in case you were wondering. It's a beautiful, sunny day here in Hawai'i, which makes me disinclined to surround myself with the black clouds of headlines. However, like every beautiful, sunny day since I've move...
Weblog: Electric Venom
Tracked: July 10, 2003 06:10 PM

Re: MTSpeling

Alexei, I’ve had no luck getting MTSpeling to work. Lingua::Ispell isn’t on my server, nor are they interested in adding it, so I put it in extlib. As advised in the comments, I created a separate folder for it. MTSpeling went into my plugin folder and I updated my comment preview template. However, it’s not catching any spelling errors at all.

Any ideas where I went wrong?

Posted by: Venomous Kate on July 12, 2003 04:34 AM # | Reply to this


Excerpt: After some fucking around with all kinds of crap, I have gotten the Moveable Type spell checking installed and working for both comments and posts. Yeah me! If you want to check your comments, just use the preview function....
Weblog: PQBON's WebLog
Tracked: July 14, 2003 09:00 PM

Jabber, Spell Check, Bot, Web page

Excerpt: Today's Freshmeat newsletter had a mention of Speller Pages, a Javascript library for doing server-side spell checking. Adding it to your application involves adding a form button that calls a function when clicked which sends your text to the server,...
Weblog: ilovett
Tracked: September 3, 2003 09:33 AM

So little time...

Excerpt: I was planning on writing a review of iTunes for Windows today, but what with one thing and another (i.e. being at work all day and then finally getting home at 10pm after visiting a few people) I haven't got...
Weblog: Amun-Ra ~
Tracked: October 21, 2003 06:36 PM

So little time...

Excerpt: I was planning on writing a review of iTunes for Windows today, but what with one thing and another (i.e. being at work all day and then finally getting home at 10pm after visiting a few people) I haven't got...
Weblog: Amun-Ra ~
Tracked: October 21, 2003 06:37 PM


Excerpt: Has anyone gotten the MTSpeling plugin to work with MT 2.64 when it comes to previewing posts? If so, I have questions. Many, many questions....
Weblog: Silflay Hraka
Tracked: November 26, 2003 12:25 PM

Spell checker!

Excerpt: I justinstalled the MTSpeling plugin for MT - finally, something can correct my awful spelling! And cool, it's really works. I love how easy it is to plug in the plugins....
Weblog: Cranky Dan
Tracked: December 7, 2003 05:32 PM

MTSpeling in 2.64 (works fine!)

So, first of all, thanks for MTSpeling. There’s been some consternation about how to get it to work when previewing posts in MT 2.64. Fortunately, it seems to work fine. Alexei’s instructions are as correct for 2.64 as they were for 2.51. Here’s a slight recap:

1. Make sure you have all of the prerequisite Perl libraries installed. If you don’t have Lingua::Ispell installed, but do have root access to your server and it has CPAN installed, you can type

perl -MCPAN -e ‘install Lingua::Ispell’

and it will do the installation for you. If you don’t have root access or you don’t know what all this means, then it’s probably not practical for you to install this plugin.

2. Put into your MT directory. So if you have MT installed in /foo/cgi-bin/mt, then you would put it in /foo/cgi-bin/mt/plugins/.

3. Find It’ll be in /foo/cgi-bin/mt/lib/MT/Apps/ for most everyone.

4. Make a backup copy of

5. Edit Look for “preview_code”. Two lines after it, there should be an entry that looks like


Change that to

<$MTEntryBody check_spelling=”1”$>

That’s it. Your’re done with the basic install.

Posted by: Mike on December 13, 2003 01:57 PM # | Reply to this

Blog spam

Excerpt: MT-Blacklist, Jay Allen's anti-spam make me think that the evolution of spam/anti-spam technologies is a microcosm of the kind of content filtering/organization problems that we're going to be running into from here on.
Weblog: Orange Cone
Tracked: December 13, 2003 03:01 PM

spellnig test

Excerpt: this is a speling test to seee if teh spelckre is workiing...
Tracked: January 1, 2004 03:17 AM

MT-Preview absolutely rocks, but....

Excerpt: Laurent Mihalkovic (big thanks!) has come out with a great plug-in that has taken care of a nagging annoyance in MovableType for me — no way to preview an entry with the template and style sheets that will be used when it is actually viewed by vi...
Weblog: Eclectic Echoes
Tracked: January 23, 2004 11:34 PM

غلطياب املايي mt

Excerpt: یه پلاگین جالب برای ام-تی پیدا کردم که میتونه برای کسانی که وبلاگ انگلیسی دارن٬ مفید باشه. کار این پلاگین٬ غلطیابی املایی یادداشتها هست و بÙ...
Weblog: From the Dairy of a Web Seeker از دفترچه خاطرات يک وبگرد
Tracked: March 19, 2004 12:44 AM

Re: MTSpeling

Is it possible to use other dictionary than the english? Where can i change the default dict for MTSpeling?

Posted by: Pedro Custodio on March 28, 2004 03:40 AM # | Reply to this

غلطياب املايي MT

Excerpt: یه پلاگین جالب برای ام-تی پیدا کردم که کار غلطیابی املای نوشته ها را میکنه. به درد آدمهایی میخوره که وبلاگ انگلیسی دارن و یه کمی هم بیسواد هس...
Weblog: From the Dairy of a Web Seeker
Tracked: April 6, 2004 10:44 AM

Spell Check Plugin

Excerpt: MTSpeling is a MT plugin that will be useful for my students if we use Movable Type for jounals next semester. Fortunately, if I decide not to have student blogs using MT and continue with my current mode, I can...
Weblog: Mama Write
Tracked: May 19, 2004 10:49 AM


Enter email address to subscribe/unsubscribe to comments on this entry: