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

Definition

Namespace:Telerik.Web.UI.Editor

Inheritance: Telerik.Web.UI.Editor.Selection

Methods

Collapses a selection to the starting or ending position.

JS
collapse(Boolean toStart): void
Parameters:toStartBoolean

The direction in which to collapse the selection. If true the selection will collapse from end to start.

Returns the browser's Selection object

JS
getBrowserSelection(): Object
Returns:

Object

Returns the selection's content as HTML

JS
getHtml(): String
Returns:

String

Returns a reference to the selection's parent DOM element

JS
getParentElement(): Element
Returns:

Element

Returns a reference to a range object

JS
getRange(): Object
Returns:

Object

Returns the selected content as plain text

JS
getText(): String
Returns:

String

Specifies whether the current selection is a control or not.

JS
isControl(): Boolean
Returns:

Boolean

Recreates the selection range.

JS
moveToElementText(Element element): void
Parameters:elementElement

DOM element to be selected.

Pastes string at current selection

JS
pasteHtml(String htmlString, Boolean bSelContent): void
Parameters:htmlStringString

String to be pasted

bSelContentBoolean

Specifies whether to select pasted content after execution

Adds an element to current selection

JS
selectElement(Element oElement): void
Parameters:oElementElement

DOM element to be added

Selects the previously stored range

JS
selectRange(Object range): void
Parameters:rangeObject
Not finding the help you need?
Contact Support