Hi All,
I'm looking for a sample application which implements ISpellCheckProvider; I'm planning to use it to customize the spell checker to validade a comma separated domain user list against ActiveDirectory.
I'm considering this problem similar to validade words against a static dictionary. That's the correct approach?
If yes, do you have an example of this implementation?
TIA,
Rubens
I'm looking for a sample application which implements ISpellCheckProvider; I'm planning to use it to customize the spell checker to validade a comma separated domain user list against ActiveDirectory.
I'm considering this problem similar to validade words against a static dictionary. That's the correct approach?
If yes, do you have an example of this implementation?
TIA,
Rubens
3 Answers, 1 is accepted
0
Hi Rubens,
We do not have an example for the requested functionality, but you can create your own empty TDF file and after that implement a custom dictionary provider for custom txt dictionary that will return the users.
Here is what you need to do:
1) create a class that implements the ICustomDictionarySource interface. Here is an example:
The ReadWord function is called from the spell code as many times as you return a string. When you return null, the spell assumes there are no more words in the custom dictionary.
The AddWord function is called if the user chooses to add a new word to the custom dictionary.
2) set the CustomDictionarySourceTypeName in the SpellCheckSettings to the full type name of your custom provider. For example CustomDictionarySourceTypeName="myType, App_Code"
Best regards,
Rumen
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.
We do not have an example for the requested functionality, but you can create your own empty TDF file and after that implement a custom dictionary provider for custom txt dictionary that will return the users.
Here is what you need to do:
1) create a class that implements the ICustomDictionarySource interface. Here is an example:
public class myType : Telerik.Web.UI.Dictionaries.ICustomDictionarySource |
{ |
#region ICustomDictionarySource Members |
string _dictionaryPath; |
public string DictionaryPath |
{ |
get |
{ |
return _dictionaryPath; |
} |
set |
{ |
_dictionaryPath = value; |
} |
} |
string _language; |
public string Language |
{ |
get |
{ |
return _language; |
} |
set |
{ |
_language = value; |
} |
} |
string _customAppendix; |
public string CustomAppendix |
{ |
get |
{ |
return _customAppendix; |
} |
set |
{ |
_customAppendix = value; |
} |
} |
public string ReadWord() |
{ |
//return a string containing a word from the custom dictionary |
//return null when there are no more words in the custom dictionary |
return null; |
} |
public void AddWord(string word) |
{ |
//implement custom code to add the word in your custom dictionary |
} |
#endregion |
} |
The ReadWord function is called from the spell code as many times as you return a string. When you return null, the spell assumes there are no more words in the custom dictionary.
The AddWord function is called if the user chooses to add a new word to the custom dictionary.
2) set the CustomDictionarySourceTypeName in the SpellCheckSettings to the full type name of your custom provider. For example CustomDictionarySourceTypeName="myType, App_Code"
Best regards,
Rumen
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.
0
Rubens
Top achievements
Rank 1
answered on 26 Jun 2009, 11:30 PM
Hi Rumen,
thanks for your sample; I figured out that I need to implement ISpellCheckProvider to validate each user separately.
Where I do need to check that information, would be nice if I can replace the default screen for words replacement.
Is that possible?
Best regards,
Rubens
thanks for your sample; I figured out that I need to implement ISpellCheckProvider to validate each user separately.
Where I do need to check that information, would be nice if I can replace the default screen for words replacement.
Is that possible?
Best regards,
Rubens
0
Hi Rubens,
The controls inside the RadSpell window could not be customized or modified. The suggestions displayed in the default screen for words replacement are returned by the spellcheck algorithm of RadSpell: Phonetic or EditDistance. However, for the time being RadSpell does not offer the ability to work with custom algorithm.
Best regards,
Rumen
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.
The controls inside the RadSpell window could not be customized or modified. The suggestions displayed in the default screen for words replacement are returned by the spellcheck algorithm of RadSpell: Phonetic or EditDistance. However, for the time being RadSpell does not offer the ability to work with custom algorithm.
Best regards,
Rumen
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.