No internet connection
  1. Home
  2. Ideas

Open External Links in a New Tab

By Cody @codywarmbo2018-08-18 14:39:56.842Z

Currently all links open in the current tab/window. I think links that don't contain the domain Talkyard resides on/in should open in a new tab with the _blank attribute in the Markdown/HTML links that are made.

  • 3 replies
  1. KajMagnus @KajMagnus2018-08-18 15:32:45.949Z

    Hmm that makes sense, after all, Talkyard is a single-page-app, and a bit state, is lost, if opening an external domain directly in the same browser tab.

    Maybe this should be a config value — I usually think websites that by default open in the same tab, feel more "honest" — because they are kind of more okay, with the user leaving their site. So, both viewpoints: opening in the same tab, or a new, has their own benefits.

    Then there's also rel=follow or not, for external links. I've seen other software has a whitelist of domains to which all links are made rel=follow. Maybe I could add this whitelist value, and an external link config value, at the same time.

    1. CCody @codywarmbo2018-08-18 15:34:17.292Z

      I definitely think this should be an option. A dialog for making a link could also work in the Reply area, allowing a user to check a box that says soemthing like 'open in a new window'. And when that option is chosen, an icon indicating an external link could be placed near the end of said links.

      1. KajMagnus @KajMagnus2018-08-19 05:37:15.383Z

        A link editor sounds like something that's needed. For example if one clicks ctrl + k over at Quora, or in Gmail, then a small link editor dialog opens — where one can edit the title of the link, and the URL. And there could also be checkboxes for making it rel=follow or nofollow, and [ ] Open in a new tab, and ... for attachements, maybe one would want to specify the name of the downloaded file, i.e. the html5 <a download=...> attribute.

        And yes an external link icon would be good, for those external links.

        For a start, maybe "just" an admin checkbox that makes all external links open in new tab. Maybe better to wait with a real link editor, until after Prose Mirror (that's a combined Rich Text + Markdown) is in use, and maybe even someone will build a ProseMirror link editor (for some other different project) that Talkyard can reuse.