“Select Line” in Popup Menu

< 256GB iPhone 7 Plus running iOS 12.4 on unc0ver 4.3.1 and Drafts 19.1.4 >

Greetings, folks!

Please allow me to request that when when one taps and holds the screen and thus gets the popup menu, starting with “Select” and then “Select All”, that there be another choice between those two, of “Select Line” (preferably with the line feed at the end of the line included).

Being able to edit that list of popup actions would be even better!

Blessings, and thank you!

iOS already has gesture support for selecting the current line of text. Double tap selects the word, but triple tap selects the entire current line.

2 Likes

Greetings, folks!

Thanks for the response!

Alas, that is not true, at least not on an iPhone 7 Plus running iOS 12.4. Double tapping selects a word; a third tap deselects the word.

I stand by my request.

:wink:

Blessings, and thank you!

I think the gestures became standard in iOS13

The question then is, does it make sense to manually code for a feature that the latest operating system provides,having to override/duplicate the functionality and have to unpick it out once the older OSes are not supported on Drafts? It certainly wouldn’t be a strategic thing to do.

Perhaps as a workaround it would be apt to add an action to do the selection to the bar above your soft keyboard, or if you are a hardware keyboard user, a keyboard shortcut to such an action?

1 Like

Richard, try this action that select word->line->all. It should help.

https://actions.getdrafts.com/a/1HT

Greetings, folks!

I apologize for the delay in responding . . .

I did end up creating a two-line script for selecting a line:

let [loc, len] = editor.getSelectedLineRange();
// get the line, plus the ending line feed
editor.setSelectedRange(loc, len);
// or one can select just the text of the line
// editor.setSelectedRange(loc, (len - 1));

I just would request that it be part of the popup menu (as originally noted), as my customizable bar above the iPhone’s keyboard is getting much too long, and not everyone is willing to move up to the latest version of iOS.

Blessings, and thank you!

Just for awareness, you could make your keyboard bar buttons pop-up menus of options for what to do if space is becoming an issue and you are averse to the swipe scroll to view more buttons.