Create link with text when pasting a link while text is highlighted

This feature is present in many markdown editing interfaces (GitHub, Slack, this very Discourse, etc.) these days; I've gotten very used to it and it would be great to have it in Joplin as well.

Basically, when you paste a link while text is highlighted, the text is not overwritten with the link, but converted to a link.

In pictures, when pasting in this state (| delimits highlighted text):

Check out |this amazing video| about the topic!

it becomes

Check out https://www.youtube.com/watch?v=dQw4w9WgXcQ about the topic!

but should become

Check out [this amazing video](https://www.youtube.com/watch?v=dQw4w9WgXcQ) about the topic!

I'd be interested in contributing a PR for this myself, I'm familiar with TypeScript and React and this seems like a pretty simple feature to implement, but I wanted to check whether there's any chance of such a feature being accepted before starting to work on it.

The only somewhat similar feature request I found was one about automatically ingesting images if a link to an image is pasted.

6 Likes

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.