I have added an ieSpell to perform spell check with following addition in fck_toolbaritems.js
TBI.prototype.SpellCheck= new TBButton("SpellCheck", lang["SpellCheck"], SpellCheck()" , TBCMD_CUSTOM) ;
Spell check is working fine except the mouse over event over the spell check button in the toolbar. The spell check button come with the unified message.
Any clue to fix this as image alt tag or mouseover event will be highly appreciated?
Following is ie spell check function that I have got from rich text editor.
//function to perform spell check
function SpellCheck() {
try {
var tmpis = new ActiveXObject("ieSpell.ieSpellExtension");
tmpis.CheckAllLinkedDocuments(document);
}
catch(exception) {
if(exception.number==-2146827859) {
if (confirm("ieSpell not detected. Click OK to download."))
window.open("http://www.youthencounter.org/resources ... 110665.exe","DownLoad";);
}
else
alert("Error Loading ieSpell: Exception " + exception.number);
}
}
Fri, 11/28/2003 - 20:48
#1
RE: Spell Check
lang["SpellCheck"] = "Check Spelling" ;
Cheers!
SS
RE: Spell Check
RE: Spell Check
I was able to get the code above working by doing 2 things:
1. In js/fck_toolbaritems.js I defined
TBI.prototype.SpellCheck= new TBButton("SpellCheck", "SpellCheck", SpellCheck()" , TBCMD_CUSTOM) ;
I did not have the "lang" function that the first post references.
2. In the function SpellCheck() above, I removed the extraneous semi-colons so that the line with "window.open" read as :
window.open("http://www.youthencounter.org/resources ... 110665.exe","DownLoad");
Of course, I also had to add the "SpellCheck" item to my toolbar definition in js/fck_config.js.
The first time I ran it, I was prompted to download the iespell module. After I did, it promptly spellchecked my document!
This is nice, but what would be better would be to use aspell to check the document and not require a download. I'm looking into it, but any suggestions would be helpful.