RadEditor
Partial definition of RadEditor used to attribute and expose embedded skin resources.
This class does not render UI. It provides metadata to register the default Editor skins and required CSS resources.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[EmbeddedSkin("Editor")]
[EmbeddedSkin("Editor", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadEditor))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Mobile, typeof(RadEditor))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Mobile, typeof(RadButton))]
[RequiredScript(typeof(ResizeExtender))]
[RequiredScript(typeof(SpellCheckService))]
[RequiredScript(typeof(LayoutBuilderEngine))]
[RequiredScript(typeof(RadEditorScripts))]
[ClientScriptResource("Telerik.Web.UI.RadEditor", "Telerik.Web.UI.Common.Core.js")]
[ValidationProperty("Content")]
[TelerikToolboxCategory("Data Editing")]
[ToolboxBitmap(typeof(RadEditor), "Toolbox.Icons.Editor.png")]
public class RadEditor : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, IEditableTextControl, ITextControl, INamingContainer
Inheritance: objectControlWebControlRadWebControlRadEditor
Derived Classes:
Implements:
Inherited Members
Constructors
public RadEditor()
Properties
Gets or sets the value indicating whether script tags will be allowed in the editor content. This property is now obsolete. Please use the ContentFilters property or the EnableFilter and DisableFilter methods
[Bindable(true)]
[Obsolete("This property is now obsolete. Please use the ContentFilters property or the EnableFilter and DisableFilter methods", false)]
public bool AllowScripts { get; set; }
The default value is false. This means that script tags will be removed from the content.
Specifies the animation settings.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorAnimationSettings AnimationSettings { get; }
Gets or sets the value indicating whether the RadEditor will auto-resize its height to match content height
[ClientControlProperty]
[Bindable(true)]
public bool AutoResizeHeight { get; set; }
The default value is false.
Gets the collection containing the colors to put in the Foreground and Background color dropdowns.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorColorCollection Colors { get; }
A StringCollection containing the colors to put in the Foreground and Background color dropdowns. Default is an empty StringCollection.
The contents of this collection will override the default colors available in the Foreground and Background color dropdowns. In order to extend the default set you should add the default colors and the new colors.
Note: Setting this property will affect all color pickers of the RadEditor, including those in the table proprties dialogs.
Gets or sets the text content of the RadEditor control inlcuding the HTML markup.
[PersistenceMode(PersistenceMode.InnerProperty)]
[Bindable(true)]
[Themeable(true)]
public string Content { get; set; }
The text content of the RadEditor control including the HTML markup. The default is string.Empty.
The text returned by this property contains HTML markup. If only the text is needed use the Text property.
You can also set the text content of the RadEditor inline between the <Content></Content> tags. In this case setting this property in the code behind will override the inline content.
Gets or sets a string, containing the location of the content area CSS styles. You need to set this property only if you are using a custom skin.
public string ContentAreaCssFile { get; set; }
The content area CSS file.
Gets or sets the rendering mode of the editor content area. When set to Iframe, the content area is a separate document (suitable for CMS solutions or when editing a whole page). When set to Div, the content area is in the main page. The default value is Iframe.
[ClientControlProperty]
public EditorContentAreaMode ContentAreaMode { get; set; }
The rendering mode of the editor content area.
Gets or sets a value indicating which content filters will be active when the editor is loaded in the browser.
[ClientControlProperty]
public EditorFilters ContentFilters { get; set; }
The default value is EditorFilters.DefaultFilters.
EditorStripFormattingOptions enum members
Member Description RemoveScripts This filter removes script tags from the editor content. Disable the filter if you want to insert script tags in the content. MakeUrlsAbsolute This filter makes all URLs in the editor content absolute (e.g. "http://server/page.html" instead of "page.html"). This filter is DISABLED by default. FixUlBoldItalic This filter changes the deprecated u tag to a span with CSS style. IECleanAnchors Internet Explorer only - This filter removes the current page url from all anchor(#) links to the same page. FixEnclosingP This filter removes a parent paragraph tag if the whole content is inside it. MozEmStrong This filter changes b to strong and i to em in Mozilla browsers. ConvertFontToSpan This filter changes deprecated font tags to compliant span tags. ConvertToXhtml This filter converts the HTML from the editor content area to XHTML. IndentHTMLContent This filter indents the HTML content so it is more readable when you view the code. OptimizeSpans This filter tries to decrease the number of nested spans in the editor content. ConvertCharactersToEntities This filter converts reserved characters to their html entity names. ConvertInlineStylesToAttributes This filter converts XHTML compliant inline style attributes to Email compliant element attributes. DefaultFilters The default editor behavior. All content filters except MakeUrlsAbsolute are activated.
Gets the collection containing the context menus displayed in the editor content area.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorContextMenuCollection ContextMenus { get; }
Gets the collection containing the CSS classes to put in the [Apply CSS Class] dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorCssClassCollection CssClasses { get; }
A NameValueCollection containing the CSS classes to put in the [Apply CSS Class] dropdown. Default is an empty NameValueCollection .
The contents of this collection will override the default CSS classes available in the Apply CSS Class dropdown.
Gets a reference to a EditorCssFileCollection that can be used to add external CSS files in the editor content area.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorCssFileCollection CssFiles { get; }
A EditorCssFileCollection containing the names of the external CSS files that should be available in the editor's content area.
By default, RadEditor uses the CSS classes available in the current page. However, it can be configured to load external CSS files instead. This scenario is very common for editors integrated in back-end administration areas, which have one set of CSS classes, while the content is being saved in a database and displayed on the public area, which has a different set of CSS classes.
If this property is set the RadEditor loads only the styles defined in the CssFiles collection. The styles defined in the current page are not loaded in the editor content area and the "Apply Class" dropdown.
If you want to load only a subset of the defined classes you can use the CssClasses property.
Gets or sets the URL which the AJAX call will be made to. Check the help for more information.
public string DialogHandlerUrl { get; set; }
A read-only property that returns the DialogOpener instance used in the editor control.
public RadDialogOpener DialogOpener { get; }
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; }
Contains the import Rtf/Docx functionality.
public IDplImportProxy DocumentImporter { get; set; }
Contains the configuration of the DocumentManager dialog.
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileManagerDialogConfiguration DocumentManager { get; set; }
An FileManagerDialogConfiguration instance, containing the configuration of the DocumentManager dialog
Gets or sets the value indicating which will be the available EditModes.
[ClientControlProperty]
public EditModes EditModes { get; set; }
Gets or sets the value of the edit type of the Editor.
[ClientControlProperty]
public EditorEditType EditType { get; set; }
Message that will be shown over the content area when the editor is empty.
[ClientControlProperty]
public string EmptyMessage { get; set; }
Gets or sets the value, indicating whether to render the skin CSS files during Ajax requests
public override bool EnableAjaxSkinRendering { get; set; }
Overrides:
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.
When set to true enables support for WAI-ARIA
[ClientControlProperty]
[ClientPropertyName("enableAriaSupport")]
public bool EnableAriaSupport { get; set; }
When set to true enables support for entering comments in the editor content
[ClientControlProperty]
public bool EnableComments { get; set; }
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:
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.
When set to true enables support for immutable HTML elements
[ClientControlProperty]
public bool EnableImmutableElements { get; set; }
Gets or sets the value indicating whether the users will be able to resize the RadEditor control on the client
[Bindable(true)]
public bool EnableResize { get; set; }
The default value is true.
Gets or sets the value, indicating whether to render the editor as a simple textarea (for compatibility with older browsers).
public bool EnableTextareaMode { get; set; }
If EnableTextareaMode is set to true, the editor will be replaced by a textbox where you can write its HTML. All advanced editor features will be disabled.
When set to true enables support for tracking changes each time the editor content is modified
[ClientControlProperty]
public bool EnableTrackChanges { get; set; }
Gets a reference to the EditorExportSettings object that allows you to set the export file properties
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorExportSettings ExportSettings { get; }
A reference to the EditorExportSettings that allows you to set the export file properties
Use the ExportSettings property to control the export file settings This property is read-only; however, you can set the properties of the EditorExportSettings object it returns. The properties can be set declaratively using one of the following methods:
- Place an attribute in the opening tag of the Telerik RadEditor control in the form Property-Subproperty, where Subproperty is a property of the EditorExportSettings object (for example, ExportSettings-FileName).
- Nest a <ExportSettings> element between the opening and closing tags of the Telerik RadEditor control.
The properties can also be set programmatically in the form Property.Subproperty (for example, ExportSettings.FileName).
Gets or sets a value indicating where the editor will look for its dialogs.
public string ExternalDialogsPath { get; set; }
A relative path to the dialogs location. For example: "~/controls/RadEditorDialogs/".
If specified, the ExternalDialogsPath property will allow you to customize and load the editor dialogs from normal ASCX files.
Contains the configuration of the FlashManager dialog.
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileManagerDialogConfiguration FlashManager { get; set; }
An FileManagerDialogConfiguration instance, containing the configuration of the FlashManager dialog
Gets the collection containing the custom font names to put in the Font dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorFontCollection FontNames { get; }
A string collection containing the custom font names to put in the Font dropdown. Default is an empty StringCollection.
The contents of this collection will override the default fonts available in the Font dropdown. In order to extend the default set you should add the default font names and the new font names. The default font names are: Arial, Comic Sans MS, Courier New, Tahoma, Times New Roman, Verdana.
Note: the fonts must exist on the client computer.
Gets the collection containing the custom font sizes to put in the [Size] dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorFontSizeCollection FontSizes { get; }
A string collection containing the custom font sizes to put in the Size dropdown. Default is an empty StringCollection.
The contents of this collection will override the default font sizes available in the [Size] dropdown. In order to extend the default set you should add the default font sizes and the new font sizes. The default font sizes are: 1, 2, 3, 4, 5, 6 and 7.
Note: the minimum font size is 1, the maximum is 7.
Gets the collection containing the format sets to put in the FormatSets dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorFormatSetCollection FormatSets { get; }
An EditorFormatSetCollection containing the format sets to put in the FormatSets dropdown.
The contents of this collection will override the default format sets available in the FormatSets dropdown.
Gets the collection containing RadEditor HeaderTools.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorHeaderToolCollection HeaderTools { get; }
Gets or sets the height of the Web server control. The default height is 400 pixels.
public override Unit Height { get; set; }
Overrides:
Contains the configuration of the ImageManager dialog.
[PersistenceMode(PersistenceMode.InnerProperty)]
public ImageManagerDialogConfiguration ImageManager { get; set; }
An ImageManagerDialogConfiguration instance, containing the configuration of the ImageManager dialog
Gets a reference to the EditorImportSettings object that allows you to set the import Rtf/Docx properties
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual EditorImportSettings ImportSettings { get; }
A reference to the EditorImportSettings that allows you to set the import Rtf/Docx properties
Use the ImportSettings property to control the import settings This property is read-only; however, you can set the properties of the EditorImportSettings object it returns. The properties can be set declaratively using one of the following methods:
- Place an attribute in the opening tag of the Telerik RadEditor control in the form Property-Subproperty, where Subproperty is a property of the EditorImportSettings object (for example, ImportSettings Rtf-ImagesMode="External").
- Nest a <ImportSettings> element between the opening and closing tags of the Telerik RadEditor control.
The properties can also be set programmatically in the form Property.Subproperty (for example, ImportSettings.Rtf.ImagesMode).
Gets a value indicating whether the editor is being rendered in accessible mode
public virtual bool IsInAccessibleMode { get; }
This propery has no setter. If you wish to enable the accessible editor interface, use the AccessibleRadEditor control instead.
Gets or sets bool value indicating if the Runtime skin is touch.
[ClientControlProperty]
[ClientPropertyName("isSkinTouch")]
public bool IsSkinTouch { get; set; }
Gets or sets a string containing the localization language for the RadEditor UI
[ClientControlProperty]
public string Language { get; set; }
Gets the collection containing the available languages for spellchecking.
[PersistenceMode(PersistenceMode.InnerProperty)]
public SpellCheckerLanguageCollection Languages { get; }
A NameValueCollection containing the available languages for spellchecking. Default value is empty NameValueCollection.
RadEditor has integrated support for the multi-language mode of RadSpell. When working with content in different languages you can select the proper spellchecking dictionary from a dropdown button on the RadEditor toolbar.
Gets the collection containing the links to put in the Custom Links dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorLinkCollection Links { get; }
A Link object containing the links to put in the Custom Links dropdown.
The Custom Links dropdown of the RadEditor is a very convenient tool for inserting predefined hyperlinks.
Note: the links can be organized in a tree like structure.
The Localization property specifies the strings that appear in the runtime user interface of RadEditor.
public EditorStrings Localization { get; }
Gets or sets a value indicating where the editor 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/RadEditorResources/".
If specified, the LocalizationPath property will allow you to load the editor localization files from any location in the web application.
Gets or sets the max length (in symbols) of the HTML inserted in the RadEditor. When the value is 0 the property is disabled.
[ClientControlProperty]
public int MaxHtmlLength { get; set; }
Gets or sets the max length (in symbols) of the text inserted in the RadEditor. When the value is 0 the property is disabled.
[ClientControlProperty]
public int MaxTextLength { get; set; }
Contains the configuration of the MediaManager dialog.
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileManagerDialogConfiguration MediaManager { get; set; }
An FileManagerDialogConfiguration instance, containing the configuration of the MediaManager dialog
Gets the list of modules that should be made included in RadEditor.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorModuleCollection Modules { get; }
This property is obsolete. Please, use the NewLineMode property instead.
[Bindable(true)]
[Obsolete("This property is obsolete. Please, use the NewLineMode property instead.", false)]
public bool NewLineBr { get; set; }
true when the RadEditor will insert <br> tag when the [Enter] key is pressed; otherwise false. The default value is true.
Note: this property is intended for use only in Internet Explorer. The gecko-based browsers always insert <BR> tags.
Gets or sets the value indicating what element will be inserted when the [Enter] key is pressed.
[ClientControlProperty]
public EditorNewLineModes NewLineMode { get; set; }
Gets or sets a value indicating the client-side event handler that is called after an editor command was executed.
[ClientControlEvent]
[ClientPropertyName("commandExecuted")]
public virtual string OnClientCommandExecuted { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientCommandExecuted client-side event handler that is called when after an editor command was executed. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
Gets or sets a value indicating the client-side event handler that is called before an editor command starts executing.
[ClientControlEvent]
[ClientPropertyName("commandExecuting")]
public virtual string OnClientCommandExecuting { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientCommandExecuting client-side event handler is called before a command starts executing. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
This event can be cancelled.
Gets or sets a value indicating the client-side event handler that is called when an editor command has been executed providing the changed Dom element.
[ClientControlEvent]
[ClientPropertyName("domChange")]
public virtual string OnClientDomChange { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientDomChange client-side event handler is called when an editor command has been executed providing the changed Dom element. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
Gets or sets a value indicating the client-side event handler that is called when editor starts to load on the client.
[ClientControlEvent]
[ClientPropertyName("init")]
public virtual string OnClientInit { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientInit client-side event handler is called when editor starts to load on the client. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
The event is fired when the inline editing is completed.
[ClientControlEvent]
[ClientPropertyName("inlineEditCompleted")]
public string OnClientInlineEditCompleted { get; set; }
Gets or sets a value indicating the client-side event handler that is called when editor is loaded on the client.
[ClientControlEvent]
[ClientPropertyName("load")]
public virtual string OnClientLoad { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientLoad client-side event handler is called when editor is loaded on the client. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
Gets or sets a value indicating the client-side event handler that is called when the content is submitted.
[ClientControlEvent]
[ClientPropertyName("modeChange")]
public virtual string OnClientModeChange { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientModeChange client-side event handler is called when the mode of the editor is changing.. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
Gets or sets a value indicating the client-side event handler that is called when a dialog is closed, but before its value returned would be pasted into the editor.
[ClientControlEvent]
[ClientPropertyName("pasteHtml")]
public virtual string OnClientPasteHtml { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientPasteHtml client-side event handler is called when a dialog is closed, but before its value returned would be pasted into the editor. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
Gets or sets a value indicating the client-side event handler that is called when selection inside editor content area changes
[ClientControlEvent]
[ClientPropertyName("selectionChange")]
public virtual string OnClientSelectionChange { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientSelectionChange client-side event handler is called when selection inside editor content area changes. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
Gets or sets a value indicating the client-side event handler that is called when the content is submitted.
[ClientControlEvent]
[ClientPropertyName("submit")]
public virtual string OnClientSubmit { get; set; }
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
If specified, the OnClientPasteHtml client-side event handler is called when a dialog is closed, but before its value returned would be pasted into the editor. Two parameters are passed to the handler:
- sender, the RadEditor object.
- args.
Gets the collection containing the paragraph styles to put in the Paragraph Style dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorParagraphCollection Paragraphs { get; }
A NameValueCollection containing the paragraph styles to put in the Paragraph Style dropdown. Default is an empty NameValueCollection.
The contents of this collection will override the default paragraph styles available in the Paragraph Style dropdown.
Note: RadEditor also supports block format with css class set. See the example below.
Gets a reference to the RadContextMenu, if the control is enabled in RadEditor.
[Browsable(false)]
public RadContextMenu RadContextMenu { get; }
Gets the collection containing the custom real font sizes to put in the RealFontSize dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorRealFontSizeCollection RealFontSizes { get; }
A string collection containing the custom real font sizes to put in the RealFontSize dropdown. Default is an empty StringCollection.
The contents of this collection will override the default real font sizes available in the RealFontSize dropdown.
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:
Lightweight rendering mode might change the outlook of the component in some older browsers that don't support CSS3/HTML5.
Gets a reference to the ribbon bar, when toolbar mode is RibbonBar.
[Browsable(false)]
public virtual RadRibbonBar RibbonBar { get; }
Contains the configuration of the SilverlightManager dialog.
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileManagerDialogConfiguration SilverlightManager { get; set; }
An FileManagerDialogConfiguration instance, containing the configuration of the SilverlightManager dialog
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:
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 the collection containing the snippets to put in the Code Snippet dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorSnippetCollection Snippets { get; }
A NameValueCollection containing the snippets to put in the Code Snippet dropdown. Default is an empty NameValueCollection.
The Code Snippet dropdown is a very convenient tool for inserting predefined chunks of HTML content like signatures, product description templates, custom tables, etc.
The contents of this collection will override the default snippets available in the Code Snippet dropdown.
Contains the configuration of the spell checker.
[PersistenceMode(PersistenceMode.InnerProperty)]
public SpellCheckSettings SpellCheckSettings { get; }
This property is obsolete. Please, use the StripFormattingOptions property instead.
[Obsolete("This property is obsolete. Please, use the StripFormattingOptions property instead.", false)]
public EditorStripFormattingOptions StripFormattingOnPaste { get; set; }
The default value is EditorStripFormattingOptions.None.
Gets or sets the value indicating how the editor should clear the HTML formatting when the user pastes data into the content area.
[ClientControlProperty]
public EditorStripFormattingOptions StripFormattingOptions { get; set; }
The default value is EditorStripFormattingOptions.None.
EditorStripFormattingOptions enum members
Member Description None Doesn't strip anything, asks a question when MS Word formatting was detected. NoneSupressCleanMessage Doesn't strip anything and does not ask a question. MSWord Strips only MSWord related attributes and tags. MSWordNoFonts Strips the MSWord related attributes and tags and font tags. MSWordNoMargins Strips the MSWord related attributes and tags and margins MSWordRemoveAll Strips MSWord related attributes and tags, font tags and font size attributes. Css Removes style attributes. Font Removes Font tags. Span Clears Span tags. AllExceptNewLines Clears all tags except "br" and new lines (\n) on paste. All Remove all HTML formatting. Note: In Gecko-based browsers you will see the mandatory dialog box where you need to paste the content.
Gets the collection containing the symbols to put in the Symbols dropdown.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorSymbolCollection Symbols { get; }
A SymbolCollection containing the symbols to put in the Symbols dropdown. Default is an empty SymbolCollection.
The contents of this collection will override the default symbols available in the Symbols dropdown.
Note: multiple symbols can be added at once by using the SymbolCollection.Add() method.
Gets or sets a string, containing the location of the CSS styles for table css style layout tool in the TableProperties dialogue.
public string TableLayoutCssFile { get; set; }
The content area CSS file.
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:
Contains the configuration of the TemplateManager dialog.
[PersistenceMode(PersistenceMode.InnerProperty)]
public FileManagerDialogConfiguration TemplateManager { get; set; }
An FileManagerDialogConfiguration instance, containing the configuration of the TemplateManager dialog
Gets the text content of the RadEditor control without the HTML markup.
[Browsable(false)]
[Bindable(false)]
public string Text { get; set; }
The text displayed in the RadEditor without the HTML markup. The default is string.Empty.
The text returned by this property contains no HTML markup. If only the HTML markup in the text is needed use the Html property.
You can set the text content of the RadEditor by using the Html property or inline between its opening and closing tags. In this case setting the Html property in the code behind will override the inline content.
Gets or sets the value indicating how the editor toolbar will be rendered and will act on the client
[ClientControlProperty]
[Bindable(true)]
public EditorToolbarMode ToolbarMode { get; set; }
Default Toolbars are rendered around the editor content area.
Floating Toolbars are rendered in a moveable window.
PageTop Toolbars appear on top of page when editor gets focus.
ShowOnFocus Toolbars appear right above the editor when it focus.
Several editors can simulate usage of the same toolbar if this property has the same value everywhere
Gets or sets a string containing the ID (will search for both server or client ID) of a client object that should be used as a tool provider.
public string ToolProviderID { get; set; }
This property helps significantly reduce the HTML markup and JSON sent from server to the client when multiple RadEditor objects with the same tools are used on the same page.
The ToolProviderID can be set to the ID of another RadEditor, or to a custom control that implements two clientside methods get_toolHTML and get_toolJSON.
Gets the collection containing RadEditor tools.
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditorToolGroupCollection Tools { get; }
Gets or sets a string containing the path to the XML toolbar configuration file.
[Bindable(true)]
public string ToolsFile { get; set; }
This property is provided for backwards compatibility. Please, use either inline toolbar declaration or code-behind to configure the toolbars. To configure multiple RadEditor controls with the same settings you could use either Theme, UserControl with inline declaration, or CustomControl.
Use "~" (tilde) as a substitution of the web-application's root directory.
You can also provide this property with an absolute URL which returns a valid XML toolbar configuration file, e.g. http://MyServer/MyApplication/Tools/MyToolsFile.aspx
Gets or sets the width of the editor's toolbar (should be used when ToolbarMode != Default).
[ClientControlProperty]
public Unit ToolsWidth { get; set; }
Contains the configuration of the track changes functionality.
[PersistenceMode(PersistenceMode.InnerProperty)]
public TrackChangesSettings TrackChangesSettings { get; }
Specifies whether the RadContextMenu should be used.
public bool UseRadContextMenu { get; set; }
Methods
Changes the content of the Editor by accepting the track changes
public virtual void AcceptTrackChanges()
Adds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. This method is used primarily by control developers.
protected override void AddAttributesToRender(HtmlTextWriter writer)
A HtmlTextWriter that represents the output stream to render HTML content on the client.
Overrides:
protected virtual void ClearCollections()
Executes during the prerender event. We set the tools file and fill the collections with their default values.
protected override void ControlPreRender()
Overrides:
protected override void CreateChildControls()
Overrides:
Removes a specific filter from the ContentFilters.
public void DisableFilter(EditorFilters filter)
An EditorFilters value
Add a specific filter to the ContentFilters.
public void EnableFilter(EditorFilters filter)
An EditorFilters value
protected void EnsureEditorToolType()
Forces the ToolsFile to be parsed and loaded at any given time.
public virtual void EnsureToolsFileLoaded()
A way to export editor's content by using the provided RadEditorExportTemplate.
public void Export(RadEditorExportTemplate template)
Object, which implements the RadEditorExportTemplate abstract class.
This method is used to export the editor's content to DOCX format.
public void ExportToDocx()
This method is used to export the editor's content to Markdown format.
public void ExportToMarkdown()
This method is used to export the editor's content to PDF format.
public void ExportToPdf()
This method is used to export the editor's content to RTF format.
public void ExportToRtf()
Finds the tool with the given name.
public EditorTool FindTool(string name)
The name of the tool to find.
Returns:This method is used to strip comments from the Content of the editor.
public string GetHtml(EditorStripHtmlOptions stripOptions)
This method is used to convert DOCX content to HTML and loadit in RadEditor.
public void LoadDocxContent(Stream docxStream)
A Stream object holding the DOCX content to be transformed and loaded.
This method is used to convert DOCX content to HTML and load it in RadEditor.
public void LoadDocxContent(string docxText)
A String object in ASCII encoding holding the DOCX content to be transformed and loaded.
This method is used to convert Markdown content to HTML and loadit in RadEditor.
public void LoadMarkdownContent(Stream markdownStream)
A Stream object holding the Markdown content to be transformed and loaded.
This method is used to convert Markdown content to HTML and loadit in RadEditor.
public void LoadMarkdownContent(string markdownText)
A String object holding the Markdown content to be transformed and loaded.
Executed when post data is loaded from the request
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Overrides:
This method is used to convert RTF content to HTML and loadit in RadEditor.
public void LoadRtfContent(Stream rtfStream)
A Stream object holding the RTF content to be transformed and loaded.
This method is used to convert RTF content to HTML and load it in RadEditor.
public void LoadRtfContent(string rtfText)
A String object encoded in ASCII holding the RTF content to be transformed and loaded.
protected virtual void LoadToolsFile(bool loadOnlyEmptyCollections)
Loads an in-memory tools configuration document for the editor.
public virtual void LoadToolsFile(XmlDocument doc)
An XML document that defines the editor tools, menus, and related settings.
Restores view-state information from a previous request that was saved with the System.Web.UI.WebControls.WebControl.SaveViewState() method.
protected override void LoadViewState(object state)
An object that represents the control state to restore.
Overrides:
Raises the FileDelete event.
Raises the FileUpload event.
Raises the TextChanged event.
Executed when post data changes should invoke a changed event
protected override void RaisePostDataChangedEvent()
Overrides:
Registers the CSS styles for the control
protected override void RegisterCssReferences()
Overrides:
Registers the control with the ScriptManager
protected override void RegisterScriptControl()
Overrides:
Registers the script descriptors.
protected override void RegisterScriptDescriptors()
Overrides:
Changes the content of the Editor by rejecting the track changes
public virtual void RejectTrackChanges()
Saves any state that was modified after the System.Web.UI.WebControls.Style.TrackViewState() method was invoked.
protected override object SaveViewState()
An object that contains the current view state of the control; otherwise, if there is no view state associated with the control, null.
Overrides:
A way to inject a custom implementation of the DOCX export engine.
public void SetDocxExportTemplate(RadEditorExportTemplate template)
Object, which implements the RadEditorExportTemplate abstract class.
A way to inject a custom implementation of the Markdown export engine.
public void SetMarkdownExportTemplate(RadEditorExportTemplate template)
Object, which implements the RadEditorExportTemplate abstract class.
Used to set the file browser configuration paths for the editor dialogs
public void SetPaths(string[] paths, EditorFileTypes fileTypes, EditorFileOptions fileOptions)
A string array containing the paths to set.
fileTypesEditorFileTypesWhich dialogs to set the paths to.
fileOptionsEditorFileOptionsWhich paths (view, upload, delete) to set.
A way to inject a custom implementation of the PDF export engine.
public void SetPdfExportTemplate(RadEditorExportTemplate template)
Object, which implements the RadEditorExportTemplate abstract class.
A way to inject a custom implementation of the RTF export engine.
public void SetRtfExportTemplate(RadEditorExportTemplate template)
Object, which implements the RadEditorExportTemplate abstract class.
A way to inject a custom implementation for accepting/rejecting track changes.
public void SetTrackChangesAdapter(ITrackChangesAdapter adapter)
A custom implementation of the track changes adapter
Causes the control to track changes to its view state so they can be stored in the object's System.Web.UI.Control.ViewState property.
protected override void TrackViewState()
Overrides:
Events
This event is raised before the content is exported.
public event EditorExportContentEventHandler ExportContent
This event is raised before a file is deleted using the current content provider.
[SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly")]
public event EditorDialogEventHandler FileDelete
This event is raised before the file is stored using the current content provider.
[SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly")]
public event EditorDialogEventHandler FileUpload
This event is raised before the content is imported.
public event EditorImportContentEventHandler ImportContent
Occurs when the content of the RadEditor changes between posts to the server.
public event EventHandler TextChanged
Implements: