How to select text by long pressing with unity?

I’m developing a book reading application with Unity. Readers need to select text and copy it.

I want to make text selection feature via Unity TextMeshPro.

Is it possible to make text selection marks by long pressing as in the image?

I need sample code

I need it too.