public selectedText() as String:
Returns the text currently selected in the scroll view.
ANSI styling escape sequences are removed from the returned text so the clipboard receives plain content.
selected = view.selectedText()