JavaScriptSpellCheck Demos
Examples with source-code
- Basic HTML Form Spell Check
- Advanced Form Spelling Validation
- Ajax Spell Check
- Multi-Language Spell Check
- Rich Editor Compatible
Spellchecking Rich Text Areas (HTML WYSIWYGS)
Tutorial
JavaScriptSpellCheck can integrate with almost every Web HTML Editor
Step 1 - Identify your Editor's iframe
Rich Editors embed an editable iFrame in the page. You need to find the name or id of this object by looking at your page's source-code.
Step 2 - Point JavaScriptSpellCheck to the body of the Iframe Document
E.g:
Innova (YusAsp) Editor:
oSpell.spellCheckWindow('idContentoEdit1.document.body')
Use idContentoEdit1 for the first editor in the page, then idContentoEdit2 ...
CKEditor:
oSpell = new JavaScriptSpellCheck;
document.getElementById ('MyTextArea').value = CKEDITOR.instances.GroupNotes.getData();
oSpell.callBack= function() {
CKEDITOR.instances.MyTextArea.setData(document.getElementById ('MyTextArea').value);
}
oSpell.spellCheckWindow('MyTextArea');
Where MyTextArea is the id of the CKE enabled field.
FCK Editor (a little more complex) :
if (navigator.appName == "Microsoft Internet Explorer"){
oSpell.spellCheckWindow('MyTextArea___Frame.frames[0].document.body')
}else{
oSpell.spellCheckWindow('document.getElementById("MyTextArea___Frame").
document.getElementsByTagName("iframe")[0].document.body')
}
Where MyTextArea is the id of the FCK enabled field.
Note: There are discrepancies between how different browsers treat Iframes - if you use the above notation, JavaScriptSpellCheck will resolve these issues for you automatically.
