What do I want to achieve?
Show a context menu on top of highlighted text area like this.

What is my issue?
I don’t know how to get any info about selected text. I want to know
- How to detect when text is highlighted in input fields
- How to get the highlighted string
- How to get its position
What solutions have I tried so far?
- I’ve read Unity docs about InputFields to see if there is any method or property that returns highlighted text or it’s position. The closest thing that intuitively made sense was InputField.selectionFocusPosition but it returns an int (I assume it’s an index or something). Personally I’d find it intuitive to get a vector.
- I read old post this post: Is it possible to retrieve InputField selected text from (2015) but it didn’t quite answer my question.
