Definition
Namespace:Telerik.Web.UI
Inheritance: Telerik.Web.UI.RadWebControlTelerik.Web.UI.RadEditor
Events
Adds a commandExecuted event handler for the radeditor
add_commandExecuted
The event handler function to attach
Adds a commandExecuting event handler for the radeditor
add_commandExecuting
The event handler function to attach
Adds a domChange event handler for the radeditor
add_domChange
The event handler function to attach
Adds a editReady event handler for the radeditor
add_editReady
The event handler function to attach
Adds a firstShow event handler for the radeditor
add_firstShow
The event handler function to attach
Adds a init event handler for the radeditor
add_init
The event handler function to attach
Adds a inlineEditCompleted event handler for the radeditor
add_inlineEditCompleted
The event handler function to attach
Adds a load event handler for the radeditor
add_load
The event handler function to attach
Adds a modeChange event handler for the radeditor
add_modeChange
The event handler function to attach
Adds a orientationChange event handler for the radeditor
add_orientationChange
The event handler function to attach
Adds a pasteHtml event handler for the radeditor
add_pasteHtml
The event handler function to attach
Adds a selectionChange event handler for the radeditor
add_selectionChange
The event handler function to attach
Adds a spellCheckLoaded event handler for the radeditor
add_spellCheckLoaded
The event handler function to attach
Adds a submit event handler for the radeditor
add_submit
The event handler function to attach
Adds a toggleScreenMode event handler for the radeditor
add_toggleScreenMode
The event handler function to attach
Removes a commandExecuted event handler from the radeditor
remove_commandExecuted
The event handler function to remove
Removes a commandExecuting event handler from the radeditor
remove_commandExecuting
The event handler function to remove
Removes a domChange event handler from the radeditor
remove_domChange
The event handler function to remove
Removes a editReady event handler from the radeditor
remove_editReady
The event handler function to remove
Removes a firstShow event handler from the radeditor
remove_firstShow
The event handler function to remove
Removes a init event handler from the radeditor
remove_init
The event handler function to remove
Removes a inlineEditCompleted event handler from the radeditor
remove_inlineEditCompleted
The event handler function to remove
Removes a load event handler from the radeditor
remove_load
The event handler function to remove
Removes a modeChange event handler from the radeditor
remove_modeChange
The event handler function to remove
Removes a orientationChange event handler from the radeditor
remove_orientationChange
The event handler function to remove
Removes a pasteHtml event handler from the radeditor
remove_pasteHtml
The event handler function to remove
Removes a selectionChange event handler from the radeditor
remove_selectionChange
The event handler function to remove
Removes a spellCheckLoaded event handler from the radeditor
remove_spellCheckLoaded
The event handler function to remove
Removes a submit event handler from the radeditor
remove_submit
The event handler function to remove
Removes a toggleScreenMode event handler from the radeditor
remove_toggleScreenMode
The event handler function to remove
Methods
Adds a custom word to the collection.
addCustomWord(String word): void
The custom word to be added.
Adds shortcut to the RadEditor's ShortCutManager
addShortCut(String shortcutName, String shortcutString): void
Name of the shortcut
shortcutStringStringThe key combination of the shortcut
Attaches an event to RadEditor
attachEventHandler(String eventName, Function fnRef): void
The name of the event to be handled
fnRefFunctionThe function to be registered to the event
Creates DOM element and return reference to it
createElement(String tagName, String styleWidth, String styleHeight, String sId, String sName, String sValue): Element
Element
styleWidthStringWidth of the element
styleHeightStringHeight of the element
sIdStringID of the element
sNameStringName of the element
sValueStringValue of the element
Returns:Element
You can store and restore the exact position of the cursor using createRestorePoint and select method. Use getSelection().getRange()instead of the obsolete createRestorePoint()
createRestorePoint(): void
Detaches an event handler.
detachEventHandler(String eventName, Function fnRef): void
The name of the event to be handled
fnRefFunctionThe function to be removed from the eventListenerList
Toggles the state if the content area's CSS file.
disableContentAreaStylesheet(Boolean toEnable): void
Indicates whether to disable or enable the style sheet (NOTE: If argument is not available, the state will be switched).
Shows the alert to inform the user about reaching the limit of the MaxHtmlLength.
displayMaxHtmlLengthErrorMessage(): void
Shows the alert to inform the user about reaching the limit of the MaxTextLength.
displayMaxTextLengthErrorMessage(): void
Ability to programmatically disable/enable editing in editor while retaining its looks
enableEditing(Boolean enable, Telerik.Web.UI.EditingOptions editingOptions, Array optionalIgnoredTools): void
Specifies whether enable or disable editing
editingOptionsTelerik.Web.UI.EditingOptionsWhich editing options to enable
optionalIgnoredToolsArrayArray of tool names to enable
Executes a RadEditor command.
executeCommand(String radCommand, Boolean setFocus, Boolean addToStack): void
The command name.
setFocusBooleanSpecifies whether to focus the content area or not.
addToStackBooleanSpecifies whether to add the command in the undo/redo stack.
Find DOM elements within the content of the Editor control.
findContent(Function selector): Object
The selector defining the nodes to find. Selector is a conditional function (single parameter is node, returns Boolean value). If node matches the condition, then it is added in the result collection.
Returns:Object
Executes a built-in command.
fire(String comamndName, Object args): void
The name of the tool.
argsObjectCommand arguments. You can pass either an object of type Telerik.Web.UI.EditorCommandEventArgs or one with a value field - { value: String }.
Returns the instance of the AjaxSpellCheck.
get_ajaxSpellCheck(): Telerik.Web.UI.Editor.AjaxSpellCheck
Telerik.Web.UI.Editor.AjaxSpellCheck
Returns the CommandsManager instance used by the RadEditor.
get_commandsManager(): Telerik.Web.UI.Editor.CommandsManager
Telerik.Web.UI.Editor.CommandsManager
Returns a reference to the RadEditor's content area's body element
get_contentArea(): Object
Object
Returns a reference to the RadEditor's content area element.
get_contentAreaElement(): Element
Element
Returns teh instance to the RadDialogOpener.
get_dialogOpener(): Telerik.Web.UI.RadDialogOpener
Telerik.Web.UI.RadDialogOpener
Returns a reference to the RadEditor's content area's document object
get_document(): Object
Object
Returns whether the RadEditor's content area is editable or not
get_editable(): Boolean
Boolean
Returns a Boolean value that indicates whether immutability is enabled or not.
get_enableImmutableElements(): Boolean
Boolean
Returns a reference to RadEditor's filters manager
get_filtersManager(): Telerik.Web.UI.Editor.FiltersManager
Telerik.Web.UI.Editor.FiltersManager
Gets the Find/Replace overlay. This overlay currently only exists in the Mobile render mode of the Editor
get_findReplaceOverlay(): Telerik.Web.UI.Editor.FindReplaceMobile
Telerik.Web.UI.Editor.FindReplaceMobile
Returns a reference to the Preview Header Container DOM element (available only for Mobile rendering)
get_headerContainer(): Element
Element
Returns a reference to the HeaderTools Container DOM element (available only for Mobile rendering)
get_headerToolsContainer(): Element
Element
Returns the editor content as HTML
get_html(Boolean isFiltered, Telerik.Web.UI.EditorStripHtmlOptions removeComments): String
Indicates whether the content to be returned after processing it with the content filters or not.
removeCommentsTelerik.Web.UI.EditorStripHtmlOptionsIndicates whether the content to be returned without inserted comments.
Returns:String
Returns current language
get_language(): String
String
Returns an associative array of RadEditor's localization
get_localization(): Object
Object
Return a reference to the RadEditor's wrapping DOM element
get_mainTable(): Element
Element
Returns the editor's EditMode
get_mode(): Telerik.Web.UI.EditModes
Telerik.Web.UI.EditModes
Gets a reference to the modules manager.
get_modulesManager(): Telerik.Web.UI.Editor.ModulesManager
Telerik.Web.UI.Editor.ModulesManager
Returns the qualified name of the skin.
get_qualifiedSkin(): String
String
Returns a reference to the ShortCutManager instance.
get_shortCutManager(): Telerik.Web.UI.EditorShortCutManager
Telerik.Web.UI.EditorShortCutManager
Returns a reference to the used SpellCheckService
get_spellCheckService(): Telerik.Web.UI.SpellCheckService
Telerik.Web.UI.SpellCheckService
Returns the editor content as plain text (strips down the tags).
get_text(Object options): String
Options for the strip behavior. Example: { trimText: true, removeMultipleSpaces: true }.
Returns:String
Returns a reference to the RadEditor's TextArea in Html mode
get_textArea(): Element
Element
Gets a reference to the tool adapter.
get_toolAdapter(): Telerik.Web.UI.Editor.DefaultToolAdapter
Telerik.Web.UI.Editor.DefaultToolAdapter
Returns a reference to the Toolbar container DOM element
get_toolContainer(): Element
Element
Returns the inner HTML of the ToolContainer as string.
get_toolHTML(): String
String
Returns the wrapper element of the toolbar.
get_TopZone(): Element
Element
Returns whether RadEditor is using RadWindow windows or browser popup windows for its dialogs.
get_useClassicDialogs(): Boolean
Boolean
Returns a reference to the context menu object
getContextMenuByTagName(String tagName): Telerik.Web.UI.EditorContextMenu
The Tag name of the context menu
Returns:Telerik.Web.UI.EditorContextMenu
Reference to the context menu object
Returns a collection of class names existing in the CSS files added to the Iframe's content area.
getCssArray(): Array
Array
Gets a reference to a DomRange object that represents the current selection in the RadEditor
getDomRange(): Telerik.Web.UI.Editor.DomRange
Telerik.Web.UI.Editor.DomRange
Returns the current selection range.
getEditorSelectionRange(): Object
Object
Returns a reference to a specified header tool
getHeaderToolByName(String toolName): Telerik.Web.UI.EditorButton
The name of the tool
Returns:Telerik.Web.UI.EditorButton
Returns a reference to the currently selected HTML element in the editor's content area
getSelectedElement(): Element
Element
Returns a reference to the current RadEditorSelection object
getSelection(): Telerik.Web.UI.Editor.Selection
Telerik.Web.UI.Editor.Selection
Returns the selected HTML.
getSelectionHtml(): String
String
Returns a reference to a specified tool
getToolByName(String toolName): Telerik.Web.UI.EditorButton
The name of the tool
Returns:Telerik.Web.UI.EditorButton
Returns current state of a tool
getToolState(String toolName, Object range): Telerik.Web.UI.EditingOptions
The name of the tool
rangeObjectThe selection range.
Returns:Telerik.Web.UI.EditingOptions
The current state of the tool
Returns current value of a tool.
getToolValue(String toolName, Object range): String
The name of the tool.
rangeObjectThe selection range.
Returns:String
Indicates whether the RadEditor is in full screen mode.
isFullScreen(): Boolean
Boolean
Returns Boolean value that represents if the Editor is visible on the page
isVisible(): void
Re-creates the iframe content area of the RadEditor.
onParentNodeChanged(): void
Pastes HTML content to the cursor position.
pasteHtml(String content, String commandName, Boolean bSelectText, Boolean bFireSelChanged, Boolean bAddUndo): void
The content to be pasted
commandNameStringThe name of the command using PasteHtml for Undo
bSelectTextBooleanSpecifies whether to select pasted text
bFireSelChangedBooleanSpecifies whether to fire the selection change event
bAddUndoBooleanspecifies whether to add the command in the Undo
Inserts a link element in the editor content.
pasteHyperLink(Element linkElmenet, String commandName): void
The DOM element of the link.
commandNameStringThe command name fired the method.
Raise a RadEditor's event
raiseEvent(String evName, Object args): void
Name of the event to be raised
argsObjectArguments to be sent
Fire RadEditor's Redo command
redo(Number depth): void
Number of commands to redo
Refreshes the zoomed content. Useful when content is resized outside the RadEditor API.
refreshContentZoom(): void
Modifies a node from the content to be editable.
removeNodeImmutability(Element node): void
The node element.
Removes a shortcut from the RadEditor's ShortCutManager
removeShortCut(String shortcutName): void
Name of the the shortcut
Re-renders the editor on the client. Useful when the editor is in an invisible container that is shown dynamically.
repaint(): void
Force RadEditor to save current content
saveContent(): void
Select an element from the content area
selectElement(Element element, Boolean fireEvent): void
Element to be selected
fireEventBooleanSpecifies whether to raise the selectionChange event
Sets the AjaxSpellCheck instance to be used by the RadEditor.
set_ajaxSpellCheck(Telerik.Web.UI.Editor.AjaxSpellCheck ajaxSpellCheck): void
The instance of the AjaxSpellCheck to serve the spell checking service.
Sets mode of the RadEditor's content area
set_editable(Boolean editable): void
Specifies whether to enable or disable edit-ability.
Sets a Boolean value that indicates whether immutability to be enabled or not.
set_enableImmutableElements(Boolean value): void
Indicates whether to be enabled or disabled.
Replaces the current content with a new one.
set_html(String content, String title, Boolean setFocus, Boolean raiseSelChanged): void
The HTML content to be inserted.
titleStringThe command's title shown in the Undo stack.
setFocusBooleanSpecifies whether setFocus to be fired after the command execution
raiseSelChangedBooleanIndicates whether to raise selectioChange event.
Sets RadEditor in HTML, Preview or Design mode
set_mode(Telerik.Web.UI.EditModes value): void
The mode to be switched on.
Specifies whether RadEditor will use RadWindow instances or browser's windows to open dialogs. If the parameter is set to true the editor will use the browser windows.
set_useClassicDialogs(Boolean value): void
Indicates whether to enable or disable.
Sets the RadEditor visible on the client
set_visible(Boolean toShow): void
Indicates whether to be visible or not.
IE ONLY. Alias of setFocus
setActive(): void
Sets the focus on RadEditor
setFocus(): void
Modifies a node from the content to be not editable.
setNodeImmutability(Element node): void
The node element.
Sets a shortcut. If it does not exist in the ShortCutManager list it will be added as well
setShortCut(String shortcutName, String shortcutString): void
Name of the shortcut
shortcutStringStringThe key combination of the shortcut
Sets the width and height of the RadEditor (in pixels)
setSize(Number width, Number height): void
Width to be set
heightNumberHeight to be set
Open a light dialog.
showDialog(String dialogName, Object argument, Function callbackFunction): void
The name of the dialog to be opened.
argumentObjectThe client parameters to be passed to the dialog
callbackFunctionFunctionThe function to be executed when the dialog is closed. The function syntax is myFunction
Open a dialog, placed in an external page.
showExternalDialog(String url, Object argument, Number width, Number height, Function callbackFunction, Object callbackArgs, String title, String modal, Telerik.Web.UI.WindowBehaviors behaviors, Boolean showStatusbar, Boolean showTitlebar): void
The URL of the ASPX page to open.
argumentObjectThe client parameters to be passed to the dialog. Optional.
widthNumberThe width of the RadWindow dialog. Required.
heightNumberThe height of the RadWindow dialog. Required.
callbackFunctionFunctionThe function to be executed when the dialog is closed. The function syntax is myFunction
callbackArgsObjectThe additional parameters to be passed to the callbackFunction when it is executed. Optional.
titleStringThe text in the RadWindow title bar. Optional.
modalStringSpecifies whether RadWindow should be modal or not. The default is true. Optional.
behaviorsTelerik.Web.UI.WindowBehaviorsThe WindowBehaviors to be enabled for the dialog.
showStatusbarBooleanSpecifies whether RadWindow displays its statusbar or not. The default is true. Optional.
showTitlebarBooleanSpecifies whether RadWindow displays its titlebar or not. The default is true. Optional.
Causes the editor to start the spell checker.
startSpellCheck(): void
Toggles the full screen mode of RadEditor.
toggleScreenMode(): void
Fire RadEditor's Undo command
undo(Number depth): void
Number of commands to undo
Returns a Boolean value indicating whether the passed filter is enabled or not.
usesContentFilter(String filterName): Boolean
The name of the tool.
Returns:Boolean
Validates the current length of the HTML content. Optional String parameter can be added to validate with additional content without inserting it into the HTML.
validateMaxHtmlLength(String html): Boolean
Additional HTML to validate with.
Returns:Boolean
Validates the current length of the text. Optional String parameter can be added to validate with additional text without inserting it into the content.
validateMaxTextLength(String text): Boolean
Additional text to validate with.
Returns:Boolean
Zooms the RadEditor content similar to the Zoom command
zoomContent(String level): void
The zoom level is in percents with default value of "100%". Optional.