Clear Up
SharpKit Reference

HtmlTextRange Class

Represents text in an HTML element.

Namespace: SharpKit.Html4

Base Types

System.Object

Constructors

Name Description
HtmlTextRange()

Properties

Name Description
boundingHeight Retrieves the height of the rectangle that bounds the TextRange object.
boundingLeft Retrieves the distance between the left edge of the rectangle that bounds the TextRange object and the left side of the object that contains the TextRange.
boundingTop Retrieves the distance between the top edge of the rectangle that bounds the TextRange object and the top side of the object that contains the TextRange.
boundingWidth Retrieves the width of the rectangle that bounds the TextRange object.
htmlText Retrieves the HTML source as a valid HTML fragment.
offsetLeft Retrieves the calculated left position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.
offsetTop Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.
scrollTop Sets or retrieves the distance between the top of the object and the topmost portion of the content currently visible in the window.
text Sets or retrieves the text contained within the range.

Methods

Name Description
collapse(JsBoolean) Moves the insertion point to the beginning or end of the current range.
collapse() Moves the insertion point to the beginning or end of the current range.
compareEndPoints(JsString, HtmlTextRange) Compares an end point of a TextRange object with an end point of another range.
duplicate() Returns a duplicate of the TextRange.
findText(JsString) Searches for text in the document and positions the start and end points of the range to encompass the search JsString.
findText(JsString, JsNumber) Searches for text in the document and positions the start and end points of the range to encompass the search JsString.
findText(JsString, JsNumber, JsNumber) Searches for text in the document and positions the start and end points of the range to encompass the search JsString.
getBookmark() Retrieves a bookmark (opaque JsString) that can be used with moveToBookmark to return to the same range.
inRange(HtmlTextRange) Returns a value indicating whether one range is contained within another.
isEqual(HtmlTextRange) Returns a value indicating whether the specified range is equal to the current range.
move(JsString, JsNumber) Collapses the given text range and moves the empty range by the given number of units
moveEnd(JsString, JsNumber) Changes the start position of the range.
moveStart(JsString, JsNumber) Changes the end position of the range.
moveToBookmark(JsString) Moves to a bookmark.
moveToElementText(HtmlElement) Moves the text range so that the start and end positions of the range encompass the text in the given element.
moveToPoint(JsNumber, JsNumber) Moves the start and end positions of the text range to the given point.
parentElement() Retrieves the parent element for the given text range.
pasteHTML(JsString) Pastes HTML text into the given text range, replacing any previous text and HTML elements in the range.
scrollIntoView(JsBoolean) Causes the object to scroll into view, aligning it either at the top or bottom of the window.
select() Makes the selection equal to the current object.
setEndPoint(JsString, HtmlTextRange) Sets the endpoint of one range based on the endpoint of another range.
© Copyright 2005-2011 SharpKit. All rights reserved.