EDIT: Available a few posts below along with installation instructions.
Hey everyone,
I've been working on getting the FCK 2 spellerpages feature as a plug-in in CKE 3.
So far, it's working pretty well. I've only got two issues left to clean up.
The two issues are as follows:
So: Anyone interested in having this plug-in?
Hey everyone,
I've been working on getting the FCK 2 spellerpages feature as a plug-in in CKE 3.
So far, it's working pretty well. I've only got two issues left to clean up.
The two issues are as follows:
- This may be unrelated to this plug-in, but there's an sporadic issue with IE7/8 where while adding the toolbar button, there's an error which causes CK not to load at all. I'm not sure if it's what I'm doing, or the panelbutton plug-in throwing a fit. Reloading always causes the problem to go away, so I wonder if it's a load-order issue...
- The spell check action does not trigger an undo step (I don't see any publicly accessible equivalent to oEditor.FCKUndo.SaveUndoStep() anywhere!) yet.
So: Anyone interested in having this plug-in?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
I also fixed an issue requiring manual CSS changes... now it comes with it's own CSS file to make the spellcheck icon appear on the button.
Now if only I could figure out how to trigger undo memory...
Re: Interest in aspell/spellerpages plug-in for CKE 3?
I'd be really interested in sharing this plug in, as it is the #1 reason I can't use CKEditor 3 in my project yet...
If you can share your work it would be appreciated.
--
Mike
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Installation instructions:
[
[ 'Source', '-', 'Bold','Italic','Underline','-', 'SpellCheck']
];
Attachments:
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Mat
Re: Interest in aspell/spellerpages plug-in for CKE 3?
config.extraPlugins = 'aspell';
config.toolbar =
[
[ 'Source', '-', 'Bold','Italic','Underline','-', 'SpellCheck', 'aspell' ]
];
However, I can't get it to work right, but I am testing in windows.
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
adico is correct: You need to add SpellCheck to your toolbar.
However, you also need to remember to add "aspell" to your list of plugins!
e.g. config.plugins += ',aspell';
Other than that, I don't think anything else is needed. It's made to try to figure out where everything is. If you have any trouble, let me know.
Re: Interest in aspell/spellerpages plug-in for CKE 3?
and then I get a file download prompt for spellchecker.php
can you elaborate a little bit more...there is still something missing
Attachments:
Re: Interest in aspell/spellerpages plug-in for CKE 3?
It is set up for PHP by default; If you do not have PHP, you can select Perl or CF if I recall correctly. I have not tested Perl nor CF; they should work. There may also be an ASP version.
If you do not have any of these but have something else (e.g. Ruby) you can code your own page to handle it by basing yourself on the other available pages.
Edit: I've added instructions to the download post
Re: Interest in aspell/spellerpages plug-in for CKE 3?
The original code:
The problem is that in IE the setData call, being asynchronous, doesn't complete its work before the second firing of the saveSnaphot event. The fix is simple. The second saveSnaphot needs to be run as a callback at the completion of the setData() function:
Randy Cox
Compendium Blogware
Re: Interest in aspell/spellerpages plug-in for CKE 3?
In your instructions, you mention editing aspell/dialogs/aspell.js - I'm not sure where that is - I've created the directory ckeditor/plugins/aspell - and put your file - aspell.7z in there. Where are the other files?
Our server has aspell installed already in a root directory - should I move all of these files/folders to the ckeditor/plugins/aspell directory AND include the aspell.7z file you offered for download?
Thanks for helping...
John
Re: Interest in aspell/spellerpages plug-in for CKE 3?
.7z is a compressed archive. You must extract its contents: http://www.7-zip.org/
Re: Interest in aspell/spellerpages plug-in for CKE 3?
John
Re: Interest in aspell/spellerpages plug-in for CKE 3?
just wanna say thanks. works like a charm!
Re: Interest in aspell/spellerpages plug-in for CKE 3?
<cfset text = ListAppend(text, "^" & JSStringFormat(trim(line)), CRLF)>
thanks for posting this solution. works great!
Re: Interest in aspell/spellerpages plug-in for CKE 3?
For some reason, "requires: ['toolbar']" in plugin.js gives me a double toolbar with aspell enabled. With this commented out everything seems to work good.
config.extraPlugins does not seem to be supported in JoomlaCK, but adding the plugin through config.plugins or PHP works.
It would indeed be nice to have undo working with this. Seems to me there is an undo step triggered by aspell, but it is obscured by multiple blank undo steps, something like that. Start with a fresh editor, type a misspelled word, spell check, then click undo multiple times until the undo arrow grays out. Now click redo a few times and the original misspelled word shows up. In case that helps get it working.
Thanks,
Kirk
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Attachments:
Re: Interest in aspell/spellerpages plug-in for CKE 3?
It looks like there is a security issue with your plugin. Thankfully its a small one. In spellchecker.php on line 18 you are setting $textinputs to $_POST['textinputs'] without cleaning the data.
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Funny nobody has complained about this in the forum, but there is a major bug with the spell checker when misspelled words exist inside the html tags (like the title attribute on a link/image). Try this code for example:
Fortunately, this has been addressed at:
http://dev.ckeditor.com/ticket/2326
I replaced the writeBody function in wordWindow.js with the function in 'writebody1.js' in the ticket above and repackaged the plugin here.
Attachments:
Re: Interest in aspell/spellerpages plug-in for CKE 3?
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).
And changed the output to be again entity coded for that word which failed
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?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
but how do I get the misspelled words to highlight?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Thanks for this original FCK plugin and the needed port to CK.
I downloaded the latest aspell_v2.7z and worked as expected. Too, I added some features as:
- Detection of the language used when create the ckeditor and passed it to the server-side script (only php)
- Added the okButton to the dialog and the needed call to the controlsWindow.end_spell() function that finish the work.
If you want to use it, you can get the source code from saltos.net or some SaltOS package (at the lib/ckeditor/plugins/aspell directory).
More suggestions at josep.sanz@saltos.net.
Josep.
Re: Interest in aspell/spellerpages plug-in for CKE 3?
Looking at spellchecker.php
Do we need to make sure it only uses \n for new lines?
Also do we need to escapeshellcmd anything?
Re: Interest in aspell/spellerpages plug-in for CKE 3?
I've also managed to isolate the problem to this little tidbit:
* File: /aspell/spellerpages/spellChecker.js
* Code: see below
So, as people who use this probably know, the if condition is needed for certain browsers such as IE. Unfortunately, it seems IE 9 won't even accept the assignment of the window object into the spellCheckWin constructor. If I find a solution, I'll be sure to post it. However, if someone beats me to it, your response would be appreciated.
Re: Interest in aspell/spellerpages plug-in for CKE 3?
So I ended up fixing it. IE 9 apparently doesn't the same rules to "opener" as does other browsers, including earlier versions of IE.
These two fixes worked and are as follows:
* File: /aspell/spellerpages/spellchecker.html
* File: /aspell/spellerpages/controls.html
Re: Interest in aspell/spellerpages plug-in for CKE 3?
That way we don't have to put together all of the different patches posted in this thread.
Re: Interest in aspell/spellerpages plug-in for CKE 3?
I'm wondering if there's an option to have more of a SCAYT-style, or at least an inline spell-check, functionality here rather than having the checker open a modal dialog. If not, what would be the best approach to implement something like that? Would this have to be another plugin entirely?
thanks,
Dan