# Copy marked text in URL format popup

**URL:** https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155
**Category:** Feature
**Created:** [January 16, 2018, 10:52am UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155 "2018-01-16T10:52:18Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Matthias\_Schuster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matthias_schuster/32/389927_2.png) [@Matthias\_Schuster](https://meta.discourse.org/u/Matthias_Schuster)
#### Post date: [January 16, 2018, 10:52am UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/1 "2018-01-16T10:52:18Z")

</div>

When I choose to add a link on a text, I simply mark the specific text (in Github), press the link button and I get a nice, preformatted syntax, which lets me simply copy in the URL.

In Discourse, a pop-up appears which lets me write the already written text again.

My proposal is: Let the pop-up automatically use the marked text as “displayed text” 🙂

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 16, 2018, 10:33pm UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/2 "2018-01-16T22:33:35Z")

</div>

Oh yes we should be doing this, can you add it to your list @vinothkannans low priority?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [January 16, 2018, 11:00pm UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/3 "2018-01-16T23:00:27Z")

</div>

FYI this is purely a UX issue. Currently, if you highlight text, click Hyperlink in the toolbar and add a URL, it does add the link to the selected text despite the “optional title” field being left blank.

Ideally the highlighted text should be added to the “optional title” field - but it does at least work.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [January 17, 2018, 4:37am UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/4 "2018-01-17T04:37:17Z")

</div>

Okay. Added to my list 👍

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [January 23, 2018, 9:11pm UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/5 "2018-01-23T21:11:07Z")

</div>

It is done. Now the selected text will be displayed in the title field.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [January 23, 2018, 9:12pm UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/6 "2018-01-23T21:12:30Z")

</div>

Looks good! Thanks Vinoth 🎉

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 24, 2018, 12:30am UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/7 "2018-01-24T00:30:18Z")

</div>

One tweak, you should trim any leading or trailing spaces from the text used for the selected text.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [January 24, 2018, 2:32pm UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/8 "2018-01-24T14:32:10Z")

</div>

Done. Now the trimmed selected text will be used in popup.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [January 24, 2018, 11:00pm UTC](https://meta.discourse.org/t/copy-marked-text-in-url-format-popup/78155/9 "2018-01-24T23:00:12Z")

</div>

This topic was automatically closed after 25 hours. New replies are no longer allowed.
