|
Adding FreeTextBox3 and NetSpell to DotText's Admin Area |
|
Download the latest version of these two tools from their sites respectively
http://www.freetextbox.com
http://sourceforge.net/projects/netspell/
Open just the admin project and update / add references to the new netspell.spell checker dll and the new freetextbox.dll, and build the project (note if you have the whole solution open, you will get an error that the freetextbox.dll is in use, so be sure to only have the admin project open for this). You might be able to just get away with copying in the dlls to the bin folder, but I didn't try that.
Now we need to add a couple of things to the web.config. I chose to add them to the root, so if I wanted to add the freetextbox to my feedback form I could, but you could put this at the admin level all the same:
to the appsettings area add:
<appSettings>
<add key="DictionaryFolder" value="dic" />
< / appSettings>
and to the httpHandlers add:
<system.web>
<httpHandlers>
<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
< /httpHandlers>
< / system.web>
Now copy the netspell dic folder to the root of the dottext site (not into the admin folder unless you edited the admin's web.config)
Copy the SpellCheck.ASPX, spell.js and spell.css files to the Admin folder (you should also copy these to the root if you are going to invoke them from there in a non admin implementation)
And we need to copy the FreeTextBox image gallery script into the admin area as well (copy the file ftb.imagegallery.aspx)
Finally a quick update to the Admin\UserControls\EntryEditor.ascx page to add the toolbarbutton for NetSpell (I made some formatting changes and went with the default buttons, but the net net is that you can replace the "IESpell" toolbar option with "NetSpell" and be sure to have "InsertImageFromGallery" in the list as well). My ftbBody is as follows:
<FTB:FreeTextBox id="ftbBody" runat="server" HtmlModeCss="/skins/Tranquility/style.css" DesignModeCss="/skins/Tranquility/style.css" Focus="True" ShowTagPath="True" ImageGalleryPath="/images/" Visible="False">
<toolbars>
<FTB:Toolbar>
<FTB:InsertImageFromGallery />
<FTB:NetSpell />
< /FTB:Toolbar>
< /toolbars>
< /FTB:FreeTextBox>
Have fun (note it sill seems to be having trouble with the < / combination)
Dan