Hi Folks,
Have just finished up a quick and easy plugin that allows for the integration of NetSpell (http://www.loresoft.com/Applications/Ne ... fault.aspx) with FCKEditor via a FCK plugin. Have attached it to this post, and posted the readme file below. There are probably a couple of rough edges here and there but it seems to work just fine, any problems, questions or comments just post and I'll help out if I can.
Description
-----------
FCK Editor spellcheck plugin for asp.net, spell check is performed using NetSpell (http://www.loresoft.com/Applications/Ne ... fault.aspx)
Usage
-----
- Download NetSpell from http://www.loresoft.com/Applications/Ne ... fault.aspx
- Copy NetSpell.SpellChecker.dll & NetSpell.SpellChecker.xml to your applications bin directory
- Create the DictionaryFolder key in your web.config (see web.config distributed with netspell).
- Copy plugin files to your FCK directory under editor\plugins\netspell
- Add the following to your fckconfig.js or custom config file
FCKConfig.Plugins.Add( 'netspell', 'en' );
- Include 'Net_Spell' in your toolbar definition.
Notes
-----
spellcheck.aspx & spell.js are modified from the file found in the netspell demo\Demo.Web.CSharp folder.
The modifications to spellcheck.aspx are as follows
- Added remove & remove all buttons
- Not selecting a value from the suggestions and clicking replace or replace all no longer
removes the words, to achieve this click remove..
- NetSpell doesnt seem to handle correctly and so indentifies "nbsp" as a spelling
mistake, quick workaround for this implemented.
- As the spell checker is opened in a modal dialog I added the function ShowContextText()
which displays a few words either side of spelling error in order that the user identify
the context in which the work is to appear.
edit: update netspell url..
Fri, 08/22/2008 - 22:43
#1
Re: FCKeditor & NetSpell plugin (asp.net)
Hi there,
It seems the link below is DOWN.
FCK Editor spellcheck plugin for asp.net, spell check is performed using NetSpell (http://www.loresoft.com/Applications/NetSpell)
However I have part of the NetSpell files as I have tried out the link below to make use of NetSpell with FCKEditor last week, I have also downloaded the NetSpell plugin in your post.
http://nlakkakula.wordpress.com/2008/06 ... fckeditor/
Looks like I no longer have to use the integration part listed in the above link.
I'll try out your plugin tonite.
thx a lot.
George
Re: FCKeditor & NetSpell plugin (asp.net)
Hi,
I tried the plugin and receive the following error.
C:\DOCUME~1\XXXUser\LOCALS~1\Temp\mciby6md.aspx could not be saved, because the source file could not be read.
And the temp file (mciby6md.aspx) has a sized of 0byte.
I have followed the setup procedure, the following files are also copied into the plugin folder:
fckeditor\editor\plugins\netspell\fckplugin.js
fckeditor\editor\plugins\netspell\spell.css
fckeditor\editor\plugins\netspell\spell.js
fckeditor\editor\plugins\netspell\SpellCheck.aspx
fckeditor\editor\plugins\netspell\spellcheck.gif
btw: I think the link in your post should be http://www.loresoft.com/Applications/Ne ... fault.aspx
It looks like it has to do with MVC framework.
I can get your plugin working in Asp.net webform but not asp.net MVC.
thx,
George
Re: FCKeditor & NetSpell plugin (asp.net)
Must admit that I'm not all that up to date on, and havent started to look at MVC yet. In theory the plugin should work fine under any version of the framework although it was written for a 1.1 web app, from what I've read the .aspx will pretty much have to be re-written to get it to work under mvc. Might be an interesting weekend project right there..
I have been, up until now using the other method of integrating netspell but I felt this way was a little bit tidier and ment I didnt need to have to rebuild the editor each time a new version was released..
Anyway, hope it helps..
Matt
Re: FCKeditor & NetSpell plugin (asp.net)
Got it working on MVC.
Simply add a view and copies the SpellCheck.aspx there and create a controller to point at the view respectively.
(e.g. SpellCheckController.cs
|> //method to call the view:
public ActionResult FCKEditorSpellCheck()
{
return View("SpellCheck");
} )
Then change the fckplugin.js to point at the SpellCheckController.
var NetSpellCommand=new FCKDialogCommand( 'Check Spelling',
'Check Spelling',
'/FCKEditor/FCKEditorSpellCheck', 410, 425 ) ;
thx,
George
Re: FCKeditor & NetSpell plugin (asp.net)
Problem: if "fckeditor" directory is located in the root of the web server it doesn't work. The popup to check spelling appears but with a progress bar. It can't load SpellCheck.aspx. I have moved "fckeditor" to my ASP.NET application and it works fine. Now, I am getting a JavaScript error: "permission denied". It happens only in Internet Explorer.
Re: FCKeditor & NetSpell plugin (asp.net)
I post this message to explain how the plugin should be installed. If you use the default configuration of FCKeditor and you install this plugin like it is explained by the author it is not going to work.
- FCKeditor: default installation.
By default, FCKeditor is installed in "/fckeditor" (root). Example: http://server/fckeditor
If you just copy the plugin like it is said by the author it cannot work because the plugin is an ASP.NET APPLICATION!!!!. It needs:
-> To config the directory "/fckeditor/editor/plugins/netspell" as an application. Do this on Internet Information Server (select the directory -> Properties -> Application name: -> press the button CREATE).
-> /bin: the directory where netspell's dll must be. Copy here these two files: NetSpell.SpellChecker.dll, NetSpell.SpellChecker.xml
-> /dic: the directory where dictionaries are.
-> web.config:
<configuration>
<appSettings>
<add key="DictionaryFolder" value="dic"/>
</configuration>
Hope it helps.
Re: FCKeditor & NetSpell plugin (asp.net)
I have already solved the problem with the error "permission denied". Finally, I have changed the javascript file of FCKeditor that was causing the exception.
*** File: fckeditorcode_ie.js ***
- Originally:
- Changed: (I have formatted the line to debug) the change is the bold part, just " && (e.number!=-2146828218)".
The modified file is attached.
Cheers
Attachments:
Re: FCKeditor & NetSpell plugin (asp.net)
I was able to create a "plugin" for Netspell so its installation will be similar to installing other plugins within FCK Editor (with maybe a couple more steps).
This file also takes care of the "permission denied" issue by only calling the "FCK.SetHTML()" function one time instead of every time a word was changed.
Also note that to save space in the ZIP file the only dictionary included is "US" - but I suppose one could download one of the other languages via the Netspell website.
Enjoy - I hope this saves you all a bunch of time. Feel free to distribute wherever you like.
Attachments:
Re: FCKeditor & NetSpell plugin (asp.net)
Enjoy!
Attachments:
Re: FCKeditor & NetSpell plugin (asp.net)
hi chrisajohn,
thank you for posting the zip file; always really good when someone provides clear, concise instructions and everything you need to get going i got the spellchecker working on my installation of fckeditor really easily.
gotta couple of questions/suggestions:
1 - i've downloaded all the other dictionary and the the spellchecker automatically picks the australian dictionary. i'm guessing this is due to having:
<globalization culture="en-AU" uiCulture="en-AU"/>
in the web.config?
2 - rather than store the dictionary path in the web.config, i've changed the line in SpellCheck.aspx to:
string folderName = "fckeditor/editor/plugins/netspell/dictionary";
it made sense to keep the dictionary with the plugin for portability between projects? in addition, we use svn meaning web.configs are not in source control (we'd have to manually updated all our web.configs, where as keeping it in the SpellCheck.aspx, we can just to a svn merge and everything comes across into that branch).
3 - i haven't found it yet, but is there a way to click the cancel button and replace the words that have already been spell-checked and replaced? for example, if a user only wants to spell check a portion of the text? currently, if you cancel before the spell check is complete, no words are replaced...
thanks again for posting the solution, it's really helped me out!
cheers,
jake
Re: FCKeditor & NetSpell plugin (asp.net)
Thanks!