Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-14 21:11:34

Champak
Member
Registered: 2006-01-31
Posts: 56

Spell Checker Hack

I see people have been asking for a spell checker for two years, and it seems no one has obliged. So here is a hack I put together….since I don’t want to use the browser stuff. Hopefully someone can turn this into a plug-in.

Go into txp_article.php around line 442 and Replace:
<code>
echo ‘<textarea style=“width:400px;height:420px” rows=“1” cols=“1” name=“Body” tabindex=“2”>’,htmlspecialchars($Body),’</textarea>’;
</code>

With:
<code>
echo ‘<script src=”/speller/spellChecker.js”>
///////////////////////////////////////////////////SPELL CHECKER PT1
</script><script>
///////////////////////////////////////////////////SPELL CHECKER PT2
function openSpellChecker1() {
</code><code> var Body = document.article.Body; var speller = new spellChecker( Body ); speller.openChecker();
}
</script>
<textarea style=“width:400px;height:420px” rows=“1” cols=“1” name=“Body” tabindex=“2”>’,htmlspecialchars($Body),’</textarea>
<a href=“javascript:openSpellChecker1();”>Spell Check</a>’;
</code>

Then go here and download the script:
http://sourceforge.net/projects/spellerpages/

You must have aspell installed(hosts usually don’t have a problem installing it if you don’t have it), and make sure your call to the external javascript path is correct.

Offline

#2 2006-04-30 15:18:25

GaryScott1973
New Member
Registered: 2005-10-18
Posts: 3

Re: Spell Checker Hack

Thank you — this is helpful

Offline

#3 2006-04-30 22:21:58

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Spell Checker Hack

Real nice, very textpatternish and it seems to work very well. Be ultra useful as a plugin.

Offline

#4 2006-05-01 23:39:08

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: Spell Checker Hack

Here you go.


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

Board footer

Powered by FluxBB