There are (2) spell checkers available... ieSpell which is only for msie and you have to have iespell plugin installed in your browser --> http://www.iespell.com/ The other one is SpellerPages which works on msie and FF. This one is server side and requires Aspell be installed on the server. Depending on which one you use, you have to make changes in fckconfig.js and in the case of SpellerPages also in spellchecker.php. The spellcheck button will open which ever spellchecker you have defined in your config.
In fckconfig.js around line 91 choose ieSpell or SpellerPages, ieSpell is set as default, only works with msie and only if you have iespell installed in browser. If you choose SpellerPages you then have to go to FCKeditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\spellchecker.php and around line 9 choose the path to Aspell depending on your server.
Using it on a linux server. Made change (1) [ckconfig.js choose SpellerPages] Made change (2) [spellchecker.php set path for aspell] spellcheck button still not operative in editor.
I use FCK with the ASpell-version with colfusion mx. after a few modifications it works fine on ie and firefox. If anyone is interested in the modifications, send me a email. Jenzener
Well, the modifications i made are i the file called "spellchecker.cfm" located in FCKeditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\
I added the language-attribute, because i need the spellchecker for german, french and italian as well as for english. i also added the encoding attribute (utf-8). You may need to change the path to your installation of aspell. you can find the path-definitions at the top.
Now i have the following code, unfortunatly, i delete all unused comments:
<cfsilent> <cfparam name="variables.checktext" default="" type="string"> <cfparam name="variables.languageDict" default="de" type="string"> <cfif isDefined("form.textinputs")> <cfset variables.checktext = ReReplaceNoCase(form.textinputs, "<[^>]*>", "", "ALL")> </cfif> <!--- Set up variables ---> <cfset tempFolder = "c:\aspell\temp"> <cfset tempfile = "spell_#randrange(1,1000)#"> <cfset apsell_dir = "c:\aspell\bin"> <cfset spellercss = "../spellerStyle.css"> <cfset word_win_src = "../wordWindow.js"> <cfset crlf = Chr(13) & Chr(10)> <!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes ---> <cfset submitted_text = replacelist(variables.checktext,"%u201C,%u201D","%22,%22")> <cfset submitted_text = urlDecode(submitted_text)> <!--- need to escape special javascript characters such as ' ---> <cfset unaltered_text = submitted_text> <cfset submitted_text = replace(submitted_text,"'","\'","All")> <cfset submitted_text = replace(submitted_text,"""","\""","All")> <!--- use carat on each line to escape possible aspell commands ---> <cfset text = ""> <cfloop list="#submitted_text#" index="field" delimiters=","> <cfset text = text & "%" & crlf & "^A" & crlf & "!" & crlf> <cfset field = URLDecode(field)> <cfloop list="#field#" index="line" delimiters="#crlf#"> <cfset text = text & "^" & Trim(JSStringFormat(line)) & "#crlf#"> </cfloop> </cfloop>
<!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words ---> <cffile action="write" file="#tempFolder#\#tempfile#.txt" output="#text#" charset="utf-8">
<cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type #tempFolder#\#tempfile#.txt | #apsell_dir#\aspell -a --lang=#variables.languageDict# --encoding=utf-8" variable="result" timeout="100"></cfexecute> <!--- remove temp file ---> <cffile action="delete" file="#tempFolder#\#tempfile#.txt">
<cfcontent type="text/html"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../spellerStyle.css" />
<script language="javascript" src="../wordWindow.js"></script>
<script language="javascript">
var suggs = new Array();
var words = new Array();
var textinputs = new Array();
var error;
#texts.textinputs##crlf#
#texts.words#
#texts.abort#
var wordWindowObj = new wordWindow();
wordWindowObj.originalSpellings = words;
wordWindowObj.suggestions = suggs;
wordWindowObj.textInputs = textinputs;
function init_spell() {
// check if any error occured during server-side processing
if( error ) {
alert( error );
} else {
// call the init_spell() function in the parent frameset
if (parent.frames.length) {
parent.init_spell( wordWindowObj );
} else {
alert('This page was loaded outside of a frameset. It might not display properly');
}
}
}
</script>
</head>
<body onLoad="init_spell();">
<script type="text/javascript">
wordWindowObj.writeBody();
</script>
</body>
</html></cfoutput>
RE: How to use Spell check
RE: How to use Spell check
There are (2) spell checkers available... ieSpell which is only for msie and you have to have iespell plugin installed in your browser --> http://www.iespell.com/
The other one is SpellerPages which works on msie and FF. This one is server side and requires Aspell be installed on the server. Depending on which one you use, you have to make changes in fckconfig.js and in the case of SpellerPages also in spellchecker.php. The spellcheck button will open which ever spellchecker you have defined in your config.
In fckconfig.js around line 91 choose ieSpell or SpellerPages, ieSpell is set as default, only works with msie and only if you have iespell installed in browser. If you choose SpellerPages you then have to go to FCKeditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\spellchecker.php
and around line 9 choose the path to Aspell depending on your server.
RE: How to use Spell check
Made change (1) [ckconfig.js choose SpellerPages]
Made change (2) [spellchecker.php set path for aspell]
spellcheck button still not operative in editor.
Any other suggestions?
RE: How to use Spell check
If anyone is interested in the modifications, send me a email.
Jenzener
RE: How to use Spell check
Might as well post your solution here, in case it might help some other poor soul.

RE: How to use Spell check
Well, the modifications i made are i the file called "spellchecker.cfm" located in FCKeditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\
I added the language-attribute, because i need the spellchecker for
german, french and italian as well as for english. i also added the
encoding attribute (utf-8).
You may need to change the path to your installation of aspell. you
can find the path-definitions at the top.
Now i have the following code, unfortunatly, i delete all unused comments:
<cfsilent>
<cfparam name="variables.checktext" default="" type="string">
<cfparam name="variables.languageDict" default="de" type="string">
<cfif isDefined("form.textinputs")>
<cfset variables.checktext = ReReplaceNoCase(form.textinputs, "<[^>]*>", "", "ALL")>
</cfif>
<!--- Set up variables --->
<cfset tempFolder = "c:\aspell\temp">
<cfset tempfile = "spell_#randrange(1,1000)#">
<cfset apsell_dir = "c:\aspell\bin">
<cfset spellercss = "../spellerStyle.css">
<cfset word_win_src = "../wordWindow.js">
<cfset crlf = Chr(13) & Chr(10)>
<!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes --->
<cfset submitted_text = replacelist(variables.checktext,"%u201C,%u201D","%22,%22")>
<cfset submitted_text = urlDecode(submitted_text)>
<!--- need to escape special javascript characters such as ' --->
<cfset unaltered_text = submitted_text>
<cfset submitted_text = replace(submitted_text,"'","\'","All")>
<cfset submitted_text = replace(submitted_text,"""","\""","All")>
<!--- use carat on each line to escape possible aspell commands --->
<cfset text = "">
<cfloop list="#submitted_text#" index="field" delimiters=",">
<cfset text = text & "%" & crlf & "^A" & crlf & "!" & crlf>
<cfset field = URLDecode(field)>
<cfloop list="#field#" index="line" delimiters="#crlf#">
<cfset text = text & "^" & Trim(JSStringFormat(line)) & "#crlf#">
</cfloop>
</cfloop>
<!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words --->
<cffile action="write" file="#tempFolder#\#tempfile#.txt" output="#text#" charset="utf-8">
<cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type #tempFolder#\#tempfile#.txt | #apsell_dir#\aspell -a --lang=#variables.languageDict# --encoding=utf-8" variable="result" timeout="100"></cfexecute>
<!--- remove temp file --->
<cffile action="delete" file="#tempFolder#\#tempfile#.txt">
<cfset texts = StructNew()>
<cfset texts.textinputs = "">
<cfset texts.words = "">
<cfset texts.abort = "">
<!--- Generate Text Inputs --->
<cfset i = 0>
<cfloop index="text" list="#variables.checktext#">
<cfset texts.textinputs = ListAppend(texts.textinputs, 'textinputs[#i#] = decodeURIComponent("#text#");', '#crlf#')>
<cfset i = i + 1>
</cfloop>
<!--- Generate Words Lists --->
<cfset cnt = 1>
<cfset word_cnt = 0>
<cfset input_cnt = -1>
<cfloop list="#result#" index="list" delimiters="#crlf#">
<!--- removes the first line of the aspell output "@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)" --->
<cfif Compare(cnt,1)>
<cfif Find("&", list) OR Find("##", list)>
<cfset bad_word = listGetAt(list,"2"," ")>
<!--- sugestions --->
<cfset wrdList = mid(list,(list.lastindexOf(':') + 2),(len(list) - (list.lastindexOf(':') + 2)))>
<cfset wrdsList = "">
<cfloop list=#wrdList# index="idx">
<cfset wrdsList =wrdsList&"'"&trim(replace(idx,"'","\'","All"))&"',">
</cfloop>
<!--- javascript --->
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#][#word_cnt#] = '#trim(replace(bad_word,"'","\'","All"))#';", "#crlf#")>
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#][#word_cnt#] = [#trim(wrdsList)#];", "#crlf#")>
<cfset word_cnt = word_cnt + 1>
<cfelseif find("*", list)>
<cfset input_cnt = input_cnt + "1">
<cfset word_cnt = "0">
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#] = [];", "#crlf#")>
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#] = [];", "#crlf#")>
</cfif>
</cfif>
<cfset cnt = cnt + 1>
</cfloop>
<cfif Not Compare(texts.words,"")>
<cfset texts.abort = "alert('Spell check complete.\n\nNo misspellings found.');#chrlf#top.window.close();">
</cfif>
</cfsilent>
<cfoutput>