Add spell check to my website
Asked Answered
O

6

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.

Oligarchy answered 21/12, 2009 at 15:59 Comment(0)
O
1

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

Oscilloscope answered 21/12, 2009 at 16:6 Comment(1)
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.Oligarchy
V
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.

Variegation answered 21/12, 2009 at 16:10 Comment(2)
That would explain the loading delay of JavaScripSpellCheckOligarchy
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.Immorality
E
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.

Eckard answered 21/12, 2009 at 16:35 Comment(2)
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.Oligarchy
added an example aspell integration above, might be worth checking outEckard
A
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.

Argentinaargentine answered 12/4, 2013 at 15:7 Comment(1)
What are the supported languages? Can it do spell check for Spanish as well?Palette
P
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

Palette answered 28/3, 2016 at 7:54 Comment(0)
F
-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
Footboard answered 19/8, 2020 at 18:35 Comment(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.Bacteria
@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.Footboard

© 2022 - 2024 — McMap. All rights reserved.