Multiline textfield - can lua detect selection_start + selection_end of text inside the textfield?

i wanna figure out if it is possible for some part of textfield content to be selected by the user, manually, and that selected segment to be used elsewhere. is this possible?