How to make links in composer show as blue+underlined

I’m asking as a user being frustrated that Markdown links in the composer steal too much precious composer real estate on mobile. Some long URLs can span several lines, so I was wondering if there is a setting or plugin to ensure links are shown only as the link text in blue and underlined.

Thanks.

3 Likes

To prevent a long link:

  1. Just link a word or phrase:
  • Select text, hit chain icon in composer, complete the form OR
  • DONT select text, hit chain icon in composer and fill in the form
  1. But usually a link will onebox unless the target is somehow a badly run website or blocks the onebox crawler from your site. You can prevent a big inbox by adding some additional characters to the same line, then you will just get linked words.

The exact formatting of the link depends on your theme.

1 Like

Hi Robert
Thanks for replying. Following your suggestions does not fix the problem. The links are still taking up way to much space in the tiny composer on mobile devices. I want the url not to be visible in the composer.

4 Likes

Ah sorry, I misunderstood. The links are raw in any Composer. It’s markdown. It is not a WYSIWYG editor. There is no simple solution.

7 Likes

If it’s an internal url for example a topic link then you can use the following format to make it shorter: /t/-/topic-id. This way you can skip the domain and topic title. And only use the topic id which is a number to find the topic.

Or there is a theme component too for it: Share Link Shortener

—-

If it’s an external url then I think it only possible with a kind of url shortener right now. It would be cool to build a theme component or plugin which automatically shorten the url. It could be control by a setting to restrict the internal urls or what domain setted up. But this is just an idea :sweat_smile:

3 Likes

Thanks a bunch. I tried the relative url method but failed as Discourse wrongfully added http:// in front. But I will try again. It would be great if the post number was enough for internal links.

2 Likes

Yeah, that’s possible:
For example:
This topic OP:
[OP](/t/339458)
OP

This topic third reply:
[Third repy](/t/339458/3)
Third reply

3 Likes