New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Definition

Namespace:Telerik.Web.UI

Inheritance: Telerik.Web.UI.RadWebControlTelerik.Web.UI.RadEditor

Events

Adds a commandExecuted event handler for the radeditor

JS
add_commandExecuted
Parameters:handlerFunction

The event handler function to attach

Adds a commandExecuting event handler for the radeditor

JS
add_commandExecuting
Parameters:handlerFunction

The event handler function to attach

Adds a domChange event handler for the radeditor

JS
add_domChange
Parameters:handlerFunction

The event handler function to attach

Adds a editReady event handler for the radeditor

JS
add_editReady
Parameters:handlerFunction

The event handler function to attach

Adds a firstShow event handler for the radeditor

JS
add_firstShow
Parameters:handlerFunction

The event handler function to attach

Adds a init event handler for the radeditor

JS
add_init
Parameters:handlerFunction

The event handler function to attach

Adds a inlineEditCompleted event handler for the radeditor

JS
add_inlineEditCompleted
Parameters:handlerFunction

The event handler function to attach

Adds a load event handler for the radeditor

JS
add_load
Parameters:handlerFunction

The event handler function to attach

Adds a modeChange event handler for the radeditor

JS
add_modeChange
Parameters:handlerFunction

The event handler function to attach

Adds a orientationChange event handler for the radeditor

JS
add_orientationChange
Parameters:handlerFunction

The event handler function to attach

Adds a pasteHtml event handler for the radeditor

JS
add_pasteHtml
Parameters:handlerFunction

The event handler function to attach

Adds a selectionChange event handler for the radeditor

JS
add_selectionChange
Parameters:handlerFunction

The event handler function to attach

Adds a spellCheckLoaded event handler for the radeditor

JS
add_spellCheckLoaded
Parameters:handlerFunction

The event handler function to attach

Adds a submit event handler for the radeditor

JS
add_submit
Parameters:handlerFunction

The event handler function to attach

Adds a toggleScreenMode event handler for the radeditor

JS
add_toggleScreenMode
Parameters:handlerFunction

The event handler function to attach

Removes a commandExecuted event handler from the radeditor

JS
remove_commandExecuted
Parameters:handlerFunction

The event handler function to remove

Removes a commandExecuting event handler from the radeditor

JS
remove_commandExecuting
Parameters:handlerFunction

The event handler function to remove

Removes a domChange event handler from the radeditor

JS
remove_domChange
Parameters:handlerFunction

The event handler function to remove

Removes a editReady event handler from the radeditor

JS
remove_editReady
Parameters:handlerFunction

The event handler function to remove

Removes a firstShow event handler from the radeditor

JS
remove_firstShow
Parameters:handlerFunction

The event handler function to remove

Removes a init event handler from the radeditor

JS
remove_init
Parameters:handlerFunction

The event handler function to remove

Removes a inlineEditCompleted event handler from the radeditor

JS
remove_inlineEditCompleted
Parameters:handlerFunction

The event handler function to remove

Removes a load event handler from the radeditor

JS
remove_load
Parameters:handlerFunction

The event handler function to remove

Removes a modeChange event handler from the radeditor

JS
remove_modeChange
Parameters:handlerFunction

The event handler function to remove

Removes a orientationChange event handler from the radeditor

JS
remove_orientationChange
Parameters:handlerFunction

The event handler function to remove

Removes a pasteHtml event handler from the radeditor

JS
remove_pasteHtml
Parameters:handlerFunction

The event handler function to remove

Removes a selectionChange event handler from the radeditor

JS
remove_selectionChange
Parameters:handlerFunction

The event handler function to remove

Removes a spellCheckLoaded event handler from the radeditor

JS
remove_spellCheckLoaded
Parameters:handlerFunction

The event handler function to remove

Removes a submit event handler from the radeditor

JS
remove_submit
Parameters:handlerFunction

The event handler function to remove

Removes a toggleScreenMode event handler from the radeditor

JS
remove_toggleScreenMode
Parameters:handlerFunction

The event handler function to remove

Methods

Adds a custom word to the collection.

JS
addCustomWord(String word): void
Parameters:wordString

The custom word to be added.

Adds shortcut to the RadEditor's ShortCutManager

JS
addShortCut(String shortcutName, String shortcutString): void
Parameters:shortcutNameString

Name of the shortcut

shortcutStringString

The key combination of the shortcut

Attaches an event to RadEditor

JS
attachEventHandler(String eventName, Function fnRef): void
Parameters:eventNameString

The name of the event to be handled

fnRefFunction

The function to be registered to the event

Creates DOM element and return reference to it

JS
createElement(String tagName, String styleWidth, String styleHeight, String sId, String sName, String sValue): Element
Parameters:tagNameString

Element

styleWidthString

Width of the element

styleHeightString

Height of the element

sIdString

ID of the element

sNameString

Name of the element

sValueString

Value 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()

JS
createRestorePoint(): void

Detaches an event handler.

JS
detachEventHandler(String eventName, Function fnRef): void
Parameters:eventNameString

The name of the event to be handled

fnRefFunction

The function to be removed from the eventListenerList

Toggles the state if the content area's CSS file.

JS
disableContentAreaStylesheet(Boolean toEnable): void
Parameters:toEnableBoolean

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.

JS
displayMaxHtmlLengthErrorMessage(): void

Shows the alert to inform the user about reaching the limit of the MaxTextLength.

JS
displayMaxTextLengthErrorMessage(): void

Ability to programmatically disable/enable editing in editor while retaining its looks

JS
enableEditing(Boolean enable, Telerik.Web.UI.EditingOptions editingOptions, Array optionalIgnoredTools): void
Parameters:enableBoolean

Specifies whether enable or disable editing

editingOptionsTelerik.Web.UI.EditingOptions

Which editing options to enable

optionalIgnoredToolsArray

Array of tool names to enable

Executes a RadEditor command.

JS
executeCommand(String radCommand, Boolean setFocus, Boolean addToStack): void
Parameters:radCommandString

The command name.

setFocusBoolean

Specifies whether to focus the content area or not.

addToStackBoolean

Specifies whether to add the command in the undo/redo stack.

Find DOM elements within the content of the Editor control.

JS
findContent(Function selector): Object
Parameters:selectorFunction

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.

JS
fire(String comamndName, Object args): void
Parameters:comamndNameString

The name of the tool.

argsObject

Command 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.

JS
get_ajaxSpellCheck(): Telerik.Web.UI.Editor.AjaxSpellCheck
Returns:

Telerik.Web.UI.Editor.AjaxSpellCheck

Returns the CommandsManager instance used by the RadEditor.

JS
get_commandsManager(): Telerik.Web.UI.Editor.CommandsManager
Returns:

Telerik.Web.UI.Editor.CommandsManager

Returns a reference to the RadEditor's content area's body element

JS
get_contentArea(): Object
Returns:

Object

Returns a reference to the RadEditor's content area element.

JS
get_contentAreaElement(): Element
Returns:

Element

Returns teh instance to the RadDialogOpener.

JS
get_dialogOpener(): Telerik.Web.UI.RadDialogOpener
Returns:

Telerik.Web.UI.RadDialogOpener

Returns a reference to the RadEditor's content area's document object

JS
get_document(): Object
Returns:

Object

Returns whether the RadEditor's content area is editable or not

JS
get_editable(): Boolean
Returns:

Boolean

Returns a Boolean value that indicates whether immutability is enabled or not.

JS
get_enableImmutableElements(): Boolean
Returns:

Boolean

Returns a reference to RadEditor's filters manager

JS
get_filtersManager(): Telerik.Web.UI.Editor.FiltersManager
Returns:

Telerik.Web.UI.Editor.FiltersManager

Gets the Find/Replace overlay. This overlay currently only exists in the Mobile render mode of the Editor

JS
get_findReplaceOverlay(): Telerik.Web.UI.Editor.FindReplaceMobile
Returns:

Telerik.Web.UI.Editor.FindReplaceMobile

Returns a reference to the Preview Header Container DOM element (available only for Mobile rendering)

JS
get_headerContainer(): Element
Returns:

Element

Returns a reference to the HeaderTools Container DOM element (available only for Mobile rendering)

JS
get_headerToolsContainer(): Element
Returns:

Element

Returns the editor content as HTML

JS
get_html(Boolean isFiltered, Telerik.Web.UI.EditorStripHtmlOptions removeComments): String
Parameters:isFilteredBoolean

Indicates whether the content to be returned after processing it with the content filters or not.

removeCommentsTelerik.Web.UI.EditorStripHtmlOptions

Indicates whether the content to be returned without inserted comments.

Returns:

String

Returns current language

JS
get_language(): String
Returns:

String

Returns an associative array of RadEditor's localization

JS
get_localization(): Object
Returns:

Object

Return a reference to the RadEditor's wrapping DOM element

JS
get_mainTable(): Element
Returns:

Element

Returns the editor's EditMode

JS
get_mode(): Telerik.Web.UI.EditModes
Returns:

Telerik.Web.UI.EditModes

Gets a reference to the modules manager.

JS
get_modulesManager(): Telerik.Web.UI.Editor.ModulesManager
Returns:

Telerik.Web.UI.Editor.ModulesManager

Returns the qualified name of the skin.

JS
get_qualifiedSkin(): String
Returns:

String

Returns a reference to the ShortCutManager instance.

JS
get_shortCutManager(): Telerik.Web.UI.EditorShortCutManager
Returns:

Telerik.Web.UI.EditorShortCutManager

Returns a reference to the used SpellCheckService

JS
get_spellCheckService(): Telerik.Web.UI.SpellCheckService
Returns:

Telerik.Web.UI.SpellCheckService

Returns the editor content as plain text (strips down the tags).

JS
get_text(Object options): String
Parameters:optionsObject

Options for the strip behavior. Example: { trimText: true, removeMultipleSpaces: true }.

Returns:

String

Returns a reference to the RadEditor's TextArea in Html mode

JS
get_textArea(): Element
Returns:

Element

Gets a reference to the tool adapter.

JS
get_toolAdapter(): Telerik.Web.UI.Editor.DefaultToolAdapter
Returns:

Telerik.Web.UI.Editor.DefaultToolAdapter

Returns a reference to the Toolbar container DOM element

JS
get_toolContainer(): Element
Returns:

Element

Returns the inner HTML of the ToolContainer as string.

JS
get_toolHTML(): String
Returns:

String

Returns the wrapper element of the toolbar.

JS
get_TopZone(): Element
Returns:

Element

Returns whether RadEditor is using RadWindow windows or browser popup windows for its dialogs.

JS
get_useClassicDialogs(): Boolean
Returns:

Boolean

Returns a reference to the context menu object

JS
getContextMenuByTagName(String tagName): Telerik.Web.UI.EditorContextMenu
Parameters:tagNameString

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.

JS
getCssArray(): Array
Returns:

Array

Gets a reference to a DomRange object that represents the current selection in the RadEditor

JS
getDomRange(): Telerik.Web.UI.Editor.DomRange
Returns:

Telerik.Web.UI.Editor.DomRange

Returns the current selection range.

JS
getEditorSelectionRange(): Object
Returns:

Object

Returns a reference to a specified header tool

JS
getHeaderToolByName(String toolName): Telerik.Web.UI.EditorButton
Parameters:toolNameString

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

JS
getSelectedElement(): Element
Returns:

Element

Returns a reference to the current RadEditorSelection object

JS
getSelection(): Telerik.Web.UI.Editor.Selection
Returns:

Telerik.Web.UI.Editor.Selection

Returns the selected HTML.

JS
getSelectionHtml(): String
Returns:

String

Returns a reference to a specified tool

JS
getToolByName(String toolName): Telerik.Web.UI.EditorButton
Parameters:toolNameString

The name of the tool

Returns:

Telerik.Web.UI.EditorButton

Returns current state of a tool

JS
getToolState(String toolName, Object range): Telerik.Web.UI.EditingOptions
Parameters:toolNameString

The name of the tool

rangeObject

The selection range.

Returns:

Telerik.Web.UI.EditingOptions

The current state of the tool

Returns current value of a tool.

JS
getToolValue(String toolName, Object range): String
Parameters:toolNameString

The name of the tool.

rangeObject

The selection range.

Returns:

String

Indicates whether the RadEditor is in full screen mode.

JS
isFullScreen(): Boolean
Returns:

Boolean

Returns Boolean value that represents if the Editor is visible on the page

JS
isVisible(): void

Re-creates the iframe content area of the RadEditor.

JS
onParentNodeChanged(): void

Pastes HTML content to the cursor position.

JS
pasteHtml(String content, String commandName, Boolean bSelectText, Boolean bFireSelChanged, Boolean bAddUndo): void
Parameters:contentString

The content to be pasted

commandNameString

The name of the command using PasteHtml for Undo

bSelectTextBoolean

Specifies whether to select pasted text

bFireSelChangedBoolean

Specifies whether to fire the selection change event

bAddUndoBoolean

specifies whether to add the command in the Undo

Inserts a link element in the editor content.

JS
pasteHyperLink(Element linkElmenet, String commandName): void
Parameters:linkElmenetElement

The DOM element of the link.

commandNameString

The command name fired the method.

Raise a RadEditor's event

JS
raiseEvent(String evName, Object args): void
Parameters:evNameString

Name of the event to be raised

argsObject

Arguments to be sent

Fire RadEditor's Redo command

JS
redo(Number depth): void
Parameters:depthNumber

Number of commands to redo

Refreshes the zoomed content. Useful when content is resized outside the RadEditor API.

JS
refreshContentZoom(): void

Modifies a node from the content to be editable.

JS
removeNodeImmutability(Element node): void
Parameters:nodeElement

The node element.

Removes a shortcut from the RadEditor's ShortCutManager

JS
removeShortCut(String shortcutName): void
Parameters:shortcutNameString

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.

JS
repaint(): void

Force RadEditor to save current content

JS
saveContent(): void

Select an element from the content area

JS
selectElement(Element element, Boolean fireEvent): void
Parameters:elementElement

Element to be selected

fireEventBoolean

Specifies whether to raise the selectionChange event

Sets the AjaxSpellCheck instance to be used by the RadEditor.

JS
set_ajaxSpellCheck(Telerik.Web.UI.Editor.AjaxSpellCheck ajaxSpellCheck): void
Parameters:ajaxSpellCheckTelerik.Web.UI.Editor.AjaxSpellCheck

The instance of the AjaxSpellCheck to serve the spell checking service.

Sets mode of the RadEditor's content area

JS
set_editable(Boolean editable): void
Parameters:editableBoolean

Specifies whether to enable or disable edit-ability.

Sets a Boolean value that indicates whether immutability to be enabled or not.

JS
set_enableImmutableElements(Boolean value): void
Parameters:valueBoolean

Indicates whether to be enabled or disabled.

Replaces the current content with a new one.

JS
set_html(String content, String title, Boolean setFocus, Boolean raiseSelChanged): void
Parameters:contentString

The HTML content to be inserted.

titleString

The command's title shown in the Undo stack.

setFocusBoolean

Specifies whether setFocus to be fired after the command execution

raiseSelChangedBoolean

Indicates whether to raise selectioChange event.

Sets RadEditor in HTML, Preview or Design mode

JS
set_mode(Telerik.Web.UI.EditModes value): void
Parameters:valueTelerik.Web.UI.EditModes

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.

JS
set_useClassicDialogs(Boolean value): void
Parameters:valueBoolean

Indicates whether to enable or disable.

Sets the RadEditor visible on the client

JS
set_visible(Boolean toShow): void
Parameters:toShowBoolean

Indicates whether to be visible or not.

IE ONLY. Alias of setFocus

JS
setActive(): void

Sets the focus on RadEditor

JS
setFocus(): void

Modifies a node from the content to be not editable.

JS
setNodeImmutability(Element node): void
Parameters:nodeElement

The node element.

Sets a shortcut. If it does not exist in the ShortCutManager list it will be added as well

JS
setShortCut(String shortcutName, String shortcutString): void
Parameters:shortcutNameString

Name of the shortcut

shortcutStringString

The key combination of the shortcut

Sets the width and height of the RadEditor (in pixels)

JS
setSize(Number width, Number height): void
Parameters:widthNumber

Width to be set

heightNumber

Height to be set

Open a light dialog.

JS
showDialog(String dialogName, Object argument, Function callbackFunction): void
Parameters:dialogNameString

The name of the dialog to be opened.

argumentObject

The client parameters to be passed to the dialog

callbackFunctionFunction

The function to be executed when the dialog is closed. The function syntax is myFunction

Open a dialog, placed in an external page.

JS
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
Parameters:urlString

The URL of the ASPX page to open.

argumentObject

The client parameters to be passed to the dialog. Optional.

widthNumber

The width of the RadWindow dialog. Required.

heightNumber

The height of the RadWindow dialog. Required.

callbackFunctionFunction

The function to be executed when the dialog is closed. The function syntax is myFunction

callbackArgsObject

The additional parameters to be passed to the callbackFunction when it is executed. Optional.

titleString

The text in the RadWindow title bar. Optional.

modalString

Specifies whether RadWindow should be modal or not. The default is true. Optional.

behaviorsTelerik.Web.UI.WindowBehaviors

The WindowBehaviors to be enabled for the dialog.

showStatusbarBoolean

Specifies whether RadWindow displays its statusbar or not. The default is true. Optional.

showTitlebarBoolean

Specifies whether RadWindow displays its titlebar or not. The default is true. Optional.

Causes the editor to start the spell checker.

JS
startSpellCheck(): void

Toggles the full screen mode of RadEditor.

JS
toggleScreenMode(): void

Fire RadEditor's Undo command

JS
undo(Number depth): void
Parameters:depthNumber

Number of commands to undo

Returns a Boolean value indicating whether the passed filter is enabled or not.

JS
usesContentFilter(String filterName): Boolean
Parameters:filterNameString

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.

JS
validateMaxHtmlLength(String html): Boolean
Parameters:htmlString

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.

JS
validateMaxTextLength(String text): Boolean
Parameters:textString

Additional text to validate with.

Returns:

Boolean

Zooms the RadEditor content similar to the Zoom command

JS
zoomContent(String level): void
Parameters:levelString

The zoom level is in percents with default value of "100%". Optional.

Not finding the help you need?
Contact Support