TextRange.text (Property)

Extract the text of a text range.

Availability:

JScript - 3.0
Internet Explorer - 4.0
Property/method value type:String primitive
JavaScript syntax:IEmyTextRange.text

This is somewhat similar to the innerText of an Element object. In this case the start and end points of the TextRange are taken as the delimiting boundaries. The text contained within those boundaries can be returned to your script when the property is read. If there are any HTML tags within the bounded extent of the TextRange, they will be filtered out so that the method yields pure text only values.

Because this property is read-only, you will need to use the pasteHTML() method to replace the HTML bounded by a TextRange object. However, because there appears not to be a pasteText() method, you may need to do some complex reconstructive work if there was embedded HTML and you only requested the text.

See also:TextRange.htmlText