RadSpell
Telerik RadSpell
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[EmbeddedSkin("Spell")]
[EmbeddedSkin("Spell", "Default")]
[ClientScriptResource("Telerik.Web.UI.RadSpell", "Telerik.Web.UI.Spell.RadSpell.js")]
[TelerikToolboxCategory("Miscellaneous")]
[ToolboxBitmap(typeof(RadSpell), "Toolbox.Icons.Spell.png")]
[ValidationProperty("SpellChecked")]
public class RadSpell : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, INamingContainer
Inheritance: objectControlWebControlRadWebControlRadSpell
Implements:
Inherited Members
Constructors
public RadSpell()
Properties
Gets or sets an additional querystring appended to the dialog URL.
public string AdditionalQueryString { get; set; }
A String, appended to the dialog URL
Gets or sets the URL which the AJAX call will be made to. Check the help for more information.
public string AjaxUrl { get; set; }
Gets or sets the value indicating whether the spell will allow adding custom words.
public bool AllowAddCustom { get; set; }
The default is true
Gets or sets the text of the button that will start the spellcheck. This property is localizable.
public string ButtonText { get; set; }
The default is Spell Check
Gets or sets the type of the button that will start the spellcheck.
public ButtonType ButtonType { get; set; }
The default is PushButton
Values allowed: PushButton/LinkButton/ImageButton/ None.
Setting the value to None will not render a button. The only way to start a spellcheck will be through the client-side API.
Gets or sets the class of the client side text source object.
[ClientControlProperty]
public string ClientTextSource { get; set; }
A string containing the name of the JavaScript class. The default is HtmlElementTextSource -- a built in implementation that obtains the source from a HTML element.
The text source is a JavaScript object. It has to provide two methods: GetText() and SetText(newValue).
An array of IDs of the control to check.
[TypeConverter(typeof(ListConverter))]
public string[] ControlsToCheck { get; set; }
The IDs can be server-side or client-side. RadSpell will find the appropriate server control and use its ClientID to attach to it. Note that you cannot mix server and client IDs in this list - use only one kind.
The ID of the control to check.
[TypeConverter(typeof(ControlIDConverter))]
public string ControlToCheck { get; set; }
The ID can be both a server-side ID, or a client-side ID. RadSpell will find the appropriate server control and use its ClientID to attach to it.
Gets or sets the fully qualified type name that will be used to store and read the custom dictionary.
public string CustomDictionarySourceTypeName { get; set; }
The type name must be fully qualified if the type is in a GAC-deployed assembly. The type must implement the ICustomDictionarySource interface.
Gets or sets the suffix for the custom dictionary files.
public string CustomDictionarySuffix { get; set; }
The default is -Custom
The filenames are formed with the following scheme: Language + CustomDictionarySuffix + ".txt". Different suffixes can be used to create different custom dictionaries for different users.
Gets or sets the location of a CSS file, that will be added in the dialog window. If you need to include
more than one file, use the CSS @import url(); rule to add the other files from the first.
public string DialogsCssFile { get; set; }
Gets or sets the location of a JavaScript file, that will be added in the dialog window. If you need to include
more than one file, you will need to combine the scripts into one first.
public string DialogsScriptFile { get; set; }
Gets or sets the assembly qualified name of the SpellDialog type.
public string DialogTypeName { get; set; }
The default is string.Empty
Gets or sets the virtual path of the UserControl that represents the SpellDialog.
public string DialogVirtualPath { get; set; }
The default is string.Empty
Gets or sets the dictionary language used for spellchecking.
[ClientControlProperty]
public string DictionaryLanguage { get; set; }
The default is en-US
The language name is used to find a corresponding dictionary file. Spellchecking in en-US will work only if a file en-US.TDF can be found inside the folder pointed to by DictionaryPath.
Gets or sets the path for the dictionary files.
public string DictionaryPath { get; set; }
The default is ~/RadControls/Spell/TDF/
This is the path that contains the TDF files, and the custom dictionary TXT files.
Gets or sets a the edit distance. If you increase the value, the checking speed decreases but more suggestions are presented. Applicable only in EditDistance mode.
public int EditDistance { get; set; }
The default is 1
This property takes effect only if the SpellCheckProvider property is set to EditDistanceProvider.
Gets or sets the value, indicating whether to render the skin CSS files during Ajax requests
public override bool EnableAjaxSkinRendering { get; set; }
Overrides:
Implements:
If EnableAjaxSkinRendering is set to false you will have to register the needed control base CSS file by hand when adding/showing the control with Ajax.
Gets or sets the value, indicating whether to render the link to the embedded base stylesheet of the control or not.
public override bool EnableEmbeddedBaseStylesheet { get; set; }
Overrides:
If EnableEmbeddedBaseStylesheet is set to false you will have to register the needed control base CSS file by hand.
Gets or sets the value, indicating whether to render links to the embedded client scripts or not.
public override bool EnableEmbeddedScripts { get; set; }
Overrides:
Implements:
If EnableEmbeddedScripts is set to false you will have to register the needed script files by hand.
Gets or sets the value, indicating whether to render links to the embedded skins or not.
public override bool EnableEmbeddedSkins { get; set; }
Overrides:
If EnableEmbeddedSkins is set to false you will have to register the needed CSS files by hand.
Configures the spellchecker engine, so that it knows whether to skip URL's, email addresses, and filenames and not flag them as erros.
public FragmentIgnoreOptions FragmentIgnoreOptions { get; set; }
Gets or sets the URL for the spell dialog handler
public string HandlerUrl { get; set; }
the relative path for the spell dialog handler
Gets or sets a value indicating whether whether the ControlToCheck property provides a client element ID or a server side control ID.
public bool IsClientID { get; set; }
The default is false.
When true RadSpell will look for the server-side control and get its ClientID. When false the ControlToCheck property will be interpreted as a client-side ID and will be used to attach to the target control.
Gets or sets the localization language for the user interface.
[Bindable(true)]
public string Language { get; set; }
The localization language for the user interface. The default value is en-US.
Gets or sets a value indicating where the soell will look for its .resx localization files. By default these files should be in the App_GlobalResources folder. However, if you cannot put the resource files in the default location or .resx files compilation is disabled for some reason (e.g. in a DotNetNuke environment), this property should be set to the location of the resource files.
public string LocalizationPath { get; set; }
A relative path to the dialogs location. For example: "~/controls/RadControlsResources/".
If specified, the LocalizationPath property will allow you to load the spell localization files from any location in the current web application.
Specifies the name of the client-side function that will be called when the user cancels the spell check.
[ClientControlEvent]
[ClientPropertyName("clientCheckCancelled")]
public string OnClientCheckCancelled { get; set; }
The function should accept two parameters: sender (the spell client object) and arguments.
Gets or sets the name of the client-side function that will be called when the spell check is finished.
[ClientControlEvent]
[ClientPropertyName("clientCheckFinished")]
public string OnClientCheckFinished { get; set; }
The function should accept two parameters: sender (the spell client object) and arguments.
Gets or sets the name of the client-side function that will be called when the spell check starts.
[ClientControlEvent]
[ClientPropertyName("clientCheckStarted")]
public string OnClientCheckStarted { get; set; }
The function should accept two parameters: sender (the spell client object) and arguments.
Specifies the name of the client-side function that will be called before the spell check dialog closes.
public string OnClientDialogClosed { get; set; }
The function should accept two parameters: sender (the dialog opener client object) and arguments.
Gets or sets the name of the client-side function that will be called when the spell control is initialized on the page.
[ClientControlEvent]
[ClientPropertyName("load")]
public string OnClientLoad { get; set; }
The function should accept two parameters: sender (the spell client object) and arguments.
Specifies the rendering mode of the control. Setting the mode to Lightweight will yield HTML 5/CSS 3 html and css.
public override RenderMode RenderMode { get; set; }
Overrides:
Implements:
Lightweight rendering mode might change the outlook of the component in some older browsers that don't support CSS3/HTML5.
Gets or sets the skin name for the control user interface.
[TypeConverter("Telerik.Web.Design.SkinTypeConverter, Telerik.Web.Design, Version=2026.3.812.462, Culture=neutral, PublicKeyToken=121fae78165ba3d4")]
public override string Skin { get; set; }
A string containing the skin name for the control user interface. The default is string.Empty.
Overrides:
Implements:
If this property is not set, the control will render using the skin named "Default". If EnableEmbeddedSkins is set to false, the control will not render skin.
Gets a value indicating if the target control has been spellchecked.
[Browsable(false)]
public bool SpellChecked { get; }
Spellchecking the entire text by the client would set the property to true on postback.
The property is used by the SpellCheckValidator class. You can set it on the client side with RadSpell's SetSpellChecked(false) on various events, say a TEXTAREA's OnChange.
Specifies the spellchecking algorithm which will be used by RadSpell.
public SpellCheckProvider SpellCheckProvider { get; set; }
The default is PhoneticProvider
Allows the use of a custom spell checking provider. It must implement the ISpellCheckProvider interface.
public string SpellCheckProviderTypeName { get; set; }
The default is PhoneticProvider
Gets or sets the supported languages.
[TypeConverter(typeof(ListConverter))]
public string[] SupportedLanguages { get; set; }
A string array containing the codes and names of the languages (code, name, code, name...)
The supported languages will be displayed in a drop-down list, and the user can select the language for spellchecking.
protected override bool SupportsRenderingMode { get; }
Overrides:
Gets or sets the tabindex of the RadSpell SpellCheck Button.
public override short TabIndex { get; set; }
The tabindex of the RadSpell SpellCheck Button.
Overrides:
Gets the HtmlTextWriterTag value that corresponds to this Web server control. This property is used primarily by control developers.
protected override HtmlTextWriterTag TagKey { get; }
Overrides:
Gets or sets the value used to configure the spellchecker engine to ignore words containing: UPPERCASE, some CaPitaL letters, numbers; or to ignore repeated words (very very)
public WordIgnoreOptions WordIgnoreOptions { get; set; }
Methods
Code moved into this method from OnPreRender to make sure it executed when the framework skips OnPreRender() for some reason
protected override void ControlPreRender()
Overrides:
protected override void CreateChildControls()
Overrides:
protected override void DescribeClientEvents(IScriptDescriptor descriptor)
Overrides:
protected override void DescribeClientProperties(IScriptDescriptor descriptor)
Overrides:
Executed when post data is loaded from the request
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Overrides:
protected override void RenderContents(HtmlTextWriter writer)
Overrides: