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 define 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); } }
I had a couple of errors in the above code, but after fixed it worked great. So many thanks to Sanjay.
1) The TBI.prototype needed a double quote before the SpellCheck(). Resulting in the folloing: TBI.prototype.SpellCheck = new TBButton("SpellCheck" , lang["SpellCheck"] , "SpellCheck()" , TBCMD_CUSTOM) ;
2) The parenthesis didn't match up the the function. Now I'm not sure what the exception number is supposed to be so I arbitarily changed it to the following: //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://localhost/webtest/SpellCheck/ieS ... 200577.exe","DownLoad"); } }else{ alert("Error Loading ieSpell: Exception " + exception.number); } } }
and put it into the js/fck_actions.js file. Note: the URL is on my machine, you won't likely be able to do much with this, so download iespell and put it in predefined location that you can access.
3) I had to make an entry into toolbar specification in js/fck_config.js. I added 'SpellCheck' into the config.ToolbarSets["Default"] so that a button actually displayed on the toolbar.
Now if we could only get this work in a gecko base browser;)
RE: Spell Check
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 define 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);
}
}
RE: Spell Check
lang["SpellCheck"] = "Check Spelling" ;
RE: Spell Check
I had a couple of errors in the above code, but after fixed it worked great. So many thanks to Sanjay.
1) The TBI.prototype needed a double quote before the SpellCheck(). Resulting in the folloing:
TBI.prototype.SpellCheck = new TBButton("SpellCheck" , lang["SpellCheck"] , "SpellCheck()" , TBCMD_CUSTOM) ;
2) The parenthesis didn't match up the the function. Now I'm not sure what the exception number is supposed to be so I arbitarily changed it to the following:
//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://localhost/webtest/SpellCheck/ieS ... 200577.exe","DownLoad");
}
}else{
alert("Error Loading ieSpell: Exception " + exception.number);
}
}
}
and put it into the js/fck_actions.js file.
Note: the URL is on my machine, you won't likely be able to do much with this, so download iespell and put it in predefined location that you can access.
3) I had to make an entry into toolbar specification in js/fck_config.js. I added 'SpellCheck' into the config.ToolbarSets["Default"] so that a button actually displayed on the toolbar.
Now if we could only get this work in a gecko base browser;)
Cheers
Marc
RE: Spell Check