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

Configfile.xml ignored

2 Answers 78 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Application Support
Top achievements
Rank 1
Application Support asked on 10 Jul 2009, 12:21 PM
I have a website where the Spellchecker uses the PhoneticProvider even though we are trying to use the EditDstanceProvider.
We are running on RadEditer version 7.3.5 and RadSpell version  3.2.7

The ConfigFle.xml  located at Webroot/Radcontrols/Editor contains the following:
......
<property name="RadSpellTypeName">Telerik.WebControls.RadSpell, RadSpell.Net2</property>
......
 <!-- RadSpell properties -->
 <property name="SpellAllowAddCustom">true</property>
  <property name="SpellCheckProvider">EditDistanceProvider</property>
  <property name="SpellCustomDictionarySourceTypeName"></property>
  <property name="SpellCustomDictionarySuffix">-custom</property>
  <property name="SpellDictionaryPath"></property>
  <property name="SpellDictionaryLanguage"></property>
 <property name="SpellEditDistance">1</property>
 <property name="SpellFragmentIgnoreOptions">None</property>
 <property name="SpellWordIgnoreOptions">RepeatedWords</property>
 <!-- /RadSpell properties -->
......
We placed these three test pages in the webroot:
Spelltest.aspx

<%@ Page Language="C#" MasterPageFile="MasterPages/CambridgeshireRight.master" Title="Register for Cambridgeshire.net" %>
<%@ Register Assembly="CCCDIT.InfoCam.Controls" Namespace="CCCDIT.InfoCam.Controls.UI"    TagPrefix="cc1" %>
<%@ Register Assembly="RadSpell.NET2" Namespace="Telerik.WebControls"    TagPrefix="cc2" %>
<%@ Register Assembly="RadEditor.Net2" Namespace="Telerik.WebControls"    TagPrefix="cc3" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainArea" Runat="Server">
  <div class="content">
   <asp:TextBox ID="gf" runat="server" TextMode="MultiLine" Width="100%" Height="200px" Text="arange arrrange"></asp:TextBox>
     <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" />
  </div>
</asp:Content>

SpelltestPhonetic.aspx
as above except
     <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" SpellCheckProvider="PhoneticProvider" />

SpelltestDistance.aspx

as above except
     <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" SpellCheckProvider="EditDistanceProvider" EditDistance="1" />

SpellTest and SpellTestPhonetic identify both arange and arrrange a being misspelled with suggestions given of:
  arange    -    orange    arrange    oranges    arranged    arranger    arranges 
  arrrange    -    no suggestions

SpellTestDistance again shows both arange and arrange as misspelled with suggestions:
   arange    -    range    grange    orange    arrange
  arrrange    -    arrange

Utilising the online test at http://demos.telerik.com/aspnet-ajax/spell/examples/whatsnew/defaultcs.aspx
  With EditDistanceProvider selected the results match SpellTestDistance.aspx
  With PhoneticProvider selected the results match both SpellTest.aspx and SpellTestPhonetic.aspx

The spellchecker on this text boc matches the behaviour of the PhoneticProvder.  

To me this shows the default behaviour being used by my site is the PhoneticProvider even though we have specified the EditDistanceProvider in the ConfigFile.xml.

Can anyone spot what is wrong or do I need to do something else?

2 Answers, 1 is accepted

Sort by
0
Application Support
Top achievements
Rank 1
answered on 14 Jul 2009, 01:41 PM
Other posts in the forum indicate that RadEditor is not configured to use its ConfigFile.xml file, by default and needs to be configured to do so using:

<radE:RadEditor id="RadEditor1" ConfigFile="~/RadControls/Editor/ConfigFile.xml" runat="server"></radE:RadEditor>

Unfortunately I have been unable to identify where, what file, this additional configuration needs to be added.
0
Tervel
Telerik team
answered on 15 Jul 2009, 08:21 AM
Hi Neil,

The ConfigFile.xml is a functionality of RadEditor. It has nothing to do with RadSpell, and cannot be used to configure a stand-alone RadSpell control.

What probably got you confused is that RadEditor does use an integrated RadSpell control to provide spellcheking functionality - hence it does expose a number of spell-related properties.

So, to configure a RadSpell you need to simply set its properties - just like with any other ASP.NET control. You have already done that in your tests:
        <cc2:RadSpell ID="spell1" Runat="Server" ControlToCheck="gf" RadControlsDir="~/RadControls/" DictionaryLanguage="en-GB" SpellCheckProvider="EditDistanceProvider" EditDistance="1" />

Alternatively, you can use the ASP.NET Themes mechanism and .skin files in the App_Themes folder to configure multiple instances of RadSpell. Theming functionality is general ASP.NET functionality that is not specific to RadControls and there is plenty of information online how to utilize it.

Best regards,
Tervel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Spell
Asked by
Application Support
Top achievements
Rank 1
Answers by
Application Support
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or