Found an easier way to do it, using the textSelection on a Text object. Works only on iOS >= 15, but I think it should be good enough for our needs.
Related Apple's api docstring:
/// On iOS, the person using the app touches and holds on a selectable
/// `Text` view, which brings up a system menu with menu items appropriate
/// for the current context. These menu items operate on the entire contents
/// of the `Text` view; the person can't select a range of text like they
/// can on macOS.
Resolves #482
Found an easier way to do it, using the
textSelection
on aText
object. Works only on iOS >= 15, but I think it should be good enough for our needs.Related Apple's api docstring: