PENDING: Markdown Link Action Behavior

I’m guessing there are good reasons for this or you would have already implemented, but it seems strange that when I invoke link mode, the parentheses appear to the left of cursor, rather than surround the cursor position so I can simply type the URL. I have to move the cursor, an unnecessary step.

Also, it seems un-sleek that I need to type “http://” and “.com”. Drafts is normally much more helpful than that, so I’m disappointed that no context-sensitive prompts appear around my keyboard.

See what happens when you spoil your users? We get lazy and demanding! :slight_smile:

You shouldn’t be able to type anything in link mode are you getting it confused with something else?

Drafts is capable of automating a lot of use cases, so it may yet be that whatever you are describing can be automated to meet your individual needs.

Sorry, I’m at the stage where I can use the app, mostly, but am not always sure what things are called.

If I’m typing a draft and want to live-link some text, I select the text and hit the link icon just above keyboard. In this before/after screenshot, my cursor position (which you can’t see in screenshot) is to right of parenthesis, so I need to back it up one position to type URL.

Also I’d like help typing out “http://”.

It dawns on me that this is oriented to pasting in links from clipboard rather than typing them out. So my use case might be minority, hence the issues (like I said, I figured there were good reasons for it being this way).

I asume you are using the markdown link from the keyboard extension.

The action is implemented the reverse usecase, as you can see in its documentation.

Insert Markdown link “”. If there is a text selection, use it as the link text, if a URL is in the clipboard, place it as the link.

What you want is probably to insert the title automatically and write the link.
But would this not be mich more tedious.

Try it by copying the link to the clipboard and press the button. Does it make sense now?

By the way the action is a single step Java Script action so you are able to change it.

Do you know a bit of Java Script?

No JS, unfortunately. But I can adjust my workflow to having URL ready in clipboard before formatting text with live links.

The JavaScript to do what you describe could be put together like this.

editor.setSelectedText(`[${editor.getSelectedText()}](http:\/\/.com)`);
editor.setSelectedRange(editor.getSelectedRange()[0] + editor.getSelectedRange()[1]-5,0);
editor.activate();

As an action: Jimmbo Link.

3 Likes

It might of course be a .co.uk, or .net, .org, .whatever, and Drafts has no way of knowing.

we could use a prompt object for that…
or use the TextExpander support

Iit is worse than you might imagine. There are currently over 1.5K TLD and while http is a common web protocol I think https is more common these days, and there are other protocols and registered schema.

The efficiency is always going to depend on the set of sites a user wants to reference in real life. This approach wouldn’t work for me but if the OP mainly references sites that match the described constraints, then it would save time.

I can’t see it being particularly useful to most people, as most I would expect would encounter different URLs regularly and more often than not I suspect would have them on their clipboard.

I think TextExpander for a TLD would not save much time if any. For a URL, absolutely.

A prompt could help but if in the existing flow might slow it down overall. As an additional action it might be just as fast to manually edit.

My point is simply that this approach http /.com approach is probably only really a practical solution for a very small subset of users. I don’t think there’s anything much to be gained on building out the above. I’d suggest it would be better to apply options on top of other more mainstream link actions.

Er, I’m figuring we needn’t offer every top-level domain to provide some broad convenience to a broad swathe of users in a broad swathe of cases. It’s non-agony to type a suffix; this is just a small boost for most-frequent case.

yeah, my .whatever was intended to cover that!

I totally agree.
I love the workflow of the original action.
My links enter drafts mostly via the share sheet template anyway. And we have some quite nice examples in the forum to fetch the title of the http-url in a draft.

Writing urls does seem to much effort to me. (manly working on iOS)

but everyone chooses his own poison, aren’t we?