2

I have an asp-based website which I would like to add spell checking capabilities to the textarea elements on the page. Most of the pages are generated from an engine, though I can add JavaScript to them. So my preferred solution is a JavaScript-based one. I have tried JavaScriptSpellCheck and it works okay, though I would like to see what some of my other options may be. I also found spellchecker.net but at $3500 for a server license it seems excessive.

Spell checking can be in a separate window and must support multiple languages (the more the better). Ultimately I would like to send the spell check object a collection or delimited string of textarea names or id's (preferably names as they already exist in the pages) and have it spell check all of them, updating the text as spelling is corrected.

Brettski
  • 19,351
  • 15
  • 74
  • 97

6 Answers6

1

Here is a free, open source Javascript library for spell checking that I authored:

https://github.com/LPology/Javascript-PHP-Spell-Checker

There's a link to a live demo at the top. It's designed to have the feel of a spell checker in a desktop word processor. I wrote it after being dissatisified with these same options.

To use, just include the JS and CSS files into your page, and then add this:

var checker = new sc.SpellChecker(
    button: 'spellcheck_button', // opens the spell checker when clicked
    textInput: 'text_box', // HTML field containing the text to spell check
    action: '/spellcheck.php' // URL of the server side script 
);

It includes a PHP script for spell checking, but it could be ported to another language fairly easily as long as it returns the correct JSON response.

user1091949
  • 1,933
  • 4
  • 21
  • 27
1

Check out using Google's api for this: http://www.asp101.com/articles/jeremy/googlespell/default.asp

atp
  • 30,132
  • 47
  • 125
  • 187
  • That is very interesting but there is a limit of 1000 connections per day. During peak usage, it would be easy for us to exceed this. – Brettski Dec 21 '09 at 16:29
1

If I am not wrong, Firefox's English dictionary for spell checking takes around 800KB of data.

If you like to do everything in JavaScript -- for a full-featured spell checking engine, it means you need to load that 800KB data in every page load. It's really not a good idea.

So, instead of doing that in JavaScript, send the data to the server with AJAX, check it server side, and return it back; that's the best way.

Bondolin
  • 2,793
  • 7
  • 34
  • 62
YOU
  • 120,166
  • 34
  • 186
  • 219
  • That would explain the loading delay of JavaScripSpellCheck – Brettski Dec 21 '09 at 16:30
  • why don't you just store it in the first time in the browser storage? instead of loading it every single time? load it in the first time only ==> store in browser storage ==> do lookup locally. – OAH Oct 28 '21 at 09:19
1

If I were you, I'd look into something like aspell - this is used as one of the supported spellchecking backends in TinyMCE. Personally, I use pspell because it's integrated into PHP.

EDIT

There's an aspell integration here that has a PHP or a Perl/CGI version; might be worth checking out.

Bondolin
  • 2,793
  • 7
  • 34
  • 62
robjmills
  • 18,438
  • 15
  • 77
  • 121
  • That seems to be a great library, though I would have to code the entire solution into my app. Not that I mind, I would just don't want to reinvent the wheel if there are apps available which can be referenced by my application. – Brettski Dec 21 '09 at 17:13
  • added an example aspell integration above, might be worth checking out – robjmills Dec 21 '09 at 19:12
0

Well this is quite old question, but my answer might help people who are looking for latest options on this question.

"JavaScript SpellCheck" is the industry leading spellchecker plugin for javascript. It allows the developer to easily add and control spellchecking in almost any HTML environment. You can install it in about 5 minutes by copying a folder into your website.

http://www.javascriptspellcheck.com/

Also support multiple languages - http://www.javascriptspellcheck.com/Internationalization_Demo

HaBo
  • 13,999
  • 36
  • 114
  • 206
-2

I might be a bit late on the answer to this question. I found a solution a long while ago. You must have a spell checker installed on your browser first. Then create a bookmark with the following code as the link.

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
WaterB
  • 1
  • 2
    This seems to be a well intended answer, but is fundamentally not answering the question in the context of which it is being asked. – Elise Chant Aug 19 '20 at 19:52
  • @elise chant, You are correct. Now that I read the details I get what they needed. I needed something to quality control the whole page after an upload or change to the code to verify the spelling. – WaterB Aug 19 '20 at 22:19