This is a migrated thread and some comments may be shown as answers.

Spell Check in RadEditor in MOSS 2007

1 Answer 98 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Clayton Kelemen
Top achievements
Rank 1
Clayton Kelemen asked on 22 Oct 2008, 08:31 PM
In order to test out the AJAX Spell Check function of the RadEditor I have created a sample ASP.NET web application. Following the article posted at, http://www.telerik.com/help/aspnet-ajax/enablespellcheck.html,
I was able to get the AJAX Spell Checker configured properly.

We have a custom MOSS 2007 application that has customized ASPX pages. When trying to drop on the RadEditor with the AJAX Spell Checker enabled (following the same article), we run into errors.

When pressing the AJAX Spell Check button in the toolbar, we are given a javascript error message that reads:
  • Line: 5
  • Error: Sys.ArgumentException: cannot deserialize. the data does not correspond to valid JSON
  • Parameter name: data
On the ASPX page inside the MOSS application I selected the "Enable spell check for RADEditor" which added an entry to my web.config. In the <httpHandlers> section there is an entry:

<add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.2.1001.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />

This entry matches that of my test web application so I don't believe that I need anything else.

The only other issue that I think may have an impact on this solution is that I may have the *.tdf files located in the wrong location. Does anybody know where the *.tdf file (article says: App_Data\RadSpell\) should be located for a SharePoint application?

In another forum post (URL escapes me), someone mentioned to add the following to the web.config, which was listed to possibly resolve a permissions issue, but that didn't work either.

<location path="Telerik.Web.UI.SpellCheckHandler.axd">
        <system.web>
            <authorization>
                <allow users="*" />
            </authorization>
        </system.web>
    </location>

Any information would be great. Thanks in advance...

1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 27 Oct 2008, 08:02 AM
Hi,

The App_Data in a SharePoint web application should be located in the application's root folder (e.g. c:\Inetpub\wwwroot\wss\VirtualDirectories\80\App_Data). However, if you want to have the spellchecker dictionaries in a different location, you can simply set the editor's SpellCheckSettings-DictionaryPath property. I think you can use both application relative paths ("~/dictionaries/") and absolute paths ("C:\controls\dictionaries\"). This way you can put the *.tdf files in a convenient location.

As for the javascript exception - it indicates that the spellcheck response we received from the server is not what we expected. This means that the request was not handled by the spellcheck httpHandler (Telerik.Web.UI.SpellCheckHandler.axd). You can verify this with a http debugging proxy (e.g. Firebug for Firefox or Fiddler for IE). I can offer you a workaround for this problem, which should fix the spell check handler in SharePoint 2007. Here is what you need to do:

1. Remove the entries for the spell check  handler from the web.config file as they have no effect anyway.
2. Create a new file called Telerik.Web.UI.SpellCheckHandler.ashx and put the following content inside:

<%@ WebHandler Language="C#" Class="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.2.1001.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>

3. Set the RadEditor property SpellCheckSettings-AjaxUrl to point to the above file (e.g. "/_layouts/Telerik.Web.UI.SpellCheckHandler.ashx").

This way you create a physical file to handle the spellchecker requests, which should work correctly in a MOSS environment.

Greetings,
Lini
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Clayton Kelemen
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or