Implement getText method on Document.Selection.