textSelected Property |
Gets a value representing the text which was selected when this PDF object was added to the currently loaded document (if any).
this.textSelected;
Type: String
The text which was selected when this PDF object was added.This property is read-only and should not be set to.
//get API class var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance //declare event handler function (which accepts an object of type ObjectAddedEventArgs as an argument) function objectAddedHandler(evt) { //if a strikeout annotation if (evt.obj.getType() == myApi.ObjectType.StrikeoutAnnotation) { evt.obj.setProperties({"contents" : "Delete the text: " + evt.textSelected, "open" : true}); } } //attach event handler to objectAdded event myApi.addEventListener("objectAdded", objectAddedHandler);