Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add link button to text editor #4250
If no text is selected, then it just adds a
The title portion uses the internationalized string "Title".
If a text starting by http is selected, it will assume it's a link, so will populate the url portion of the markdown link with the selected text and select the "Title" portion so the user can change it:
If the selected text does not start with http, it's considered a title and the url portion is selected: