Thanks for nice work, but it has issues with 8bit characters. Those are encoded as html entities in CKeditor, when doing spellcheck the entity coded versions of course fails.
Added one line to remove entities before running (in my case tmispell).
// Strip all tags for the text. (by FredCK - #339 / #681)
$text = preg_replace( "/<[^>]+>/", " ", $text ) ;
// Remove entities (by Jani Ollikainen)
$text = html_entity_decode($text,ENT_COMPAT,'UTF-8');
And changed the output to be again entity coded for that word which failed
if( $chardesc == '&' || $chardesc == '#' ) {
$line = explode( " ", $val, 5 );
// Change back to entities (by Jani Ollikainen)
$line[1] = htmlentities($line[1],ENT_COMPAT,'UTF-8');
But that still leaves problems then Aspell plugin changes the contents of the editor area. As it doesn't replace those values which has entity codes in them correctly. Something to do with the length of the word. As it replaces only X chars from the original word which might have X+10 characters as ä (a with two dots) is ä etc.
Then I've tried to figure out what to change to get that working correctly, but that javascript doesn't seem easy to understand as what is happening where. Could someone give any pointers on what should be done?
Was having the same problem and did a workaround as follows:
In wordWindow.js -- function setText, recompute the replacement length with the following change: endStr = this.textInputs[textIndex].substring( pos + htmlEscape(oldText).length, this.textInputs[textIndex].length
I just covered a few cases that gave me problems with my own htmlEscape function that I added to the top of the js. Do it your way, of course.
In this post there are multiple bug fixes. Is there a link from which I can download the latest aspell with all the bug fixes mentioned in this post, or do I have to make all the changes in aspell(my CKeditor version 3.6.4), or downloading the latest CKeditor 4.0 solve these issues as the packaged aspell with it would have the fixes?
For anyone interested, I took the port that keilaron created, added all the changes folks have posted on this thread, and uploaded the port to Github. Hopefully, this will help out some people.
Re: Interest in aspell/spellerpages plug-in for CKE 3?
I have a working JSP version of the server-side spellchecker script. Based on viewtopic.php?f=5&t=7200 the new version is on my blog:
http://haxx.sinequanon.net/2011/10/ckeditor-spellchecker-jsp/
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Was having the same problem and did a workaround as follows:
In wordWindow.js -- function setText, recompute the replacement length with the following change:
endStr = this.textInputs[textIndex].substring(
pos + htmlEscape(oldText).length,
this.textInputs[textIndex].length
I just covered a few cases that gave me problems with my own htmlEscape function that I added to the top of the js. Do it your way, of course.
function htmlEscape(str) {
return String(str)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '<')
.replace(/>/g, '>');
}
This trick didn't work for me
This trick didn't work for me.
I used this JS class http://www.strictly-software.com/htmlencode
and, in wordWindow.js, replaced,
by
I also confirm this plugin is working with CKEditor 4 (there's just some missing translation in aspell.js)
Download aspell plugin
Hi ,
In this post there are multiple bug fixes. Is there a link from which I can download the latest aspell with all the bug fixes mentioned in this post, or do I have to make all the changes in aspell(my CKeditor version 3.6.4), or downloading the latest CKeditor 4.0 solve these issues as the packaged aspell with it would have the fixes?
For anyone interested, I took
For anyone interested, I took the port that keilaron created, added all the changes folks have posted on this thread, and uploaded the port to Github. Hopefully, this will help out some people.