Click or drag to resize

text Property

Gets the text selected by the user.

Syntax
JavaScript
this.text;

Property Value

Type: String

The text selected at the time that the "textSelected" event is raised.

Remarks

This property is read-only and should not be set to.

Examples
The following example uses the TextSelectedEventArgs Class to handle the "textSelected" event of the PdfWebControlApi Class.
JavaScript
//declare event handler function (which accepts an object of type TextSelectedEventArgs as an argument)
function textSelectedHandler(evt)
{
    //show current text selection information
    window.alert("Text Selected: " + evt.text);
}

//get API class
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance

//attach event handler to objectAdded event
myApi.addEventListener("textSelected", textSelectedHandler);
See Also