github-flavored-markdown icon indicating copy to clipboard operation
github-flavored-markdown copied to clipboard

open link in new page

Open AliMD opened this issue 11 years ago • 221 comments

how can add target="_blank" to markdown links [test](http://test.com) in github?!

AliMD avatar Nov 23 '12 16:11 AliMD

It seems unlikely that this will ever become a feature of markdown or gfm.

That said, you can use standard HTML to add a link that targets a new window/tab:

<a href="http://example.com" target="_blank">http://example.com</a>

http://example.com

skeggse avatar Jul 16 '13 02:07 skeggse

Hmm, your example link rendered as:

<a href="http://example.com" target="_blank"></a>
<a href="http://example.com">http://example.com</a>

So clicking the visible link doesn't actually open the URL in a new window. :disappointed:

However, it does work properly if the body of the link isn't a full URL: example

trliner avatar Jul 14 '14 16:07 trliner

However, it does work properly if the body of the link isn't a full URL: example

Ahh, interesting. I guess that makes sense.

skeggse avatar Jul 15 '14 01:07 skeggse

Would adapting the “Kramdown extension” to use [link{options}](http://kramdown.gettalong.org/syntax.html) be an option?

paulmenzel avatar Mar 16 '16 18:03 paulmenzel

@paulmenzel now working in github

AliMD avatar Mar 24 '16 08:03 AliMD

@AliMD I'm having a hard time getting that to work. What am I doing wrong?

[test](http://test.com){:target="_blank"} renders as test{:target="_blank"}

trliner avatar Mar 24 '16 15:03 trliner

Same @trliner, from what I've read, multiple people have had to revert that fix because github flavor markdown doesn't support it.

chennighan avatar Jun 09 '16 12:06 chennighan

test

RichardHightower avatar Aug 25 '16 02:08 RichardHightower

The issue is still open since 23 Nov 2012

DenysVuika avatar Dec 27 '16 17:12 DenysVuika

Looks like it is not working...

<a href="http://stackoverflow.com" target="_blank">Go</a>

gautamkrishnar avatar Jan 29 '17 07:01 gautamkrishnar

Same problem with my README. The raw Markdown has the HTML but it's being scrubbed off somehow when it's rendered.

datapolitan avatar Jan 30 '17 14:01 datapolitan

I wonder how come this simple feature issue is open since 2012 (4+ years seriously???).

And before finding out this issue being reported here, I was giving syntax check again and again to kramdown ...

Wish Github starts supporting this feature

exexzian avatar Apr 01 '17 21:04 exexzian

So its now August and I am gonna keep talking about this. Why is there no solution to this ? @github

Nerajno avatar Sep 14 '17 21:09 Nerajno

Same here, even entering plain HTML with target='_blank' set does not work.

Francesco-Rizzi avatar Sep 30 '17 17:09 Francesco-Rizzi

Github doesn't implement new custom extensions to Markdown format and looks towards CommonMark. I think that https://github.com/commonmark/CommonMark/pull/105 should be approved and merged into CommonMark specification first, then Github would implement this common specification in GFM.

grv87 avatar Oct 04 '17 11:10 grv87

Wow, it blows my mind that there isn't a simple way to do this. Who doesn't find it annoying when tabs open in the same window? That should not even be the default behavior. Worse, it is apparently something that can't even be remedied right now. Sad.

seneca-wolf avatar Oct 10 '17 18:10 seneca-wolf

This is really sad

SvenJedeck avatar Oct 26 '17 10:10 SvenJedeck

Also have a need for this.

redhatstuart avatar Oct 30 '17 23:10 redhatstuart

Same here

coderberry avatar Nov 04 '17 01:11 coderberry

Ditto

juanroldan1989 avatar Nov 11 '17 15:11 juanroldan1989

+1

gabrielnieves18 avatar Nov 18 '17 23:11 gabrielnieves18

Bump.

elijah-io avatar Nov 21 '17 02:11 elijah-io

+1

Zarquan avatar Nov 24 '17 16:11 Zarquan

holy heck, guys, github leaves dis issue for SO LONG! whoa! plus, I have the same problem

ghost avatar Nov 26 '17 12:11 ghost

+1

JamesAndersonJr avatar Dec 07 '17 15:12 JamesAndersonJr

+1

Marcial1234 avatar Dec 12 '17 08:12 Marcial1234

+1

albertpeiro avatar Dec 30 '17 22:12 albertpeiro

+1

jamesjwilson avatar Jan 03 '18 17:01 jamesjwilson

+1

brainthinks avatar Jan 04 '18 06:01 brainthinks

+1

174n avatar Jan 05 '18 17:01 174n

+1

nirantak avatar Jan 07 '18 18:01 nirantak

+1

johannbarbie avatar Jan 11 '18 15:01 johannbarbie

+1

wldhg avatar Jan 12 '18 20:01 wldhg

+1

VolkmarR avatar Jan 22 '18 08:01 VolkmarR

+1

brgaines avatar Jan 23 '18 01:01 brgaines

still waiting on this....

SkyHustle avatar Jan 26 '18 01:01 SkyHustle

why? this is as old as the whole www..... Why is implementing a target such a problem?

nullsibnelf avatar Jan 26 '18 12:01 nullsibnelf

+1

jasonmimick avatar Jan 30 '18 15:01 jasonmimick

+1

TakingItCasual avatar Feb 02 '18 10:02 TakingItCasual

+1

jayliu50 avatar Feb 08 '18 03:02 jayliu50

+1

Michael-Schaer avatar Feb 09 '18 16:02 Michael-Schaer

+1

roberto910907 avatar Feb 09 '18 17:02 roberto910907

+1

nuhkoca avatar Feb 10 '18 00:02 nuhkoca

+1

joelzamboni avatar Feb 12 '18 04:02 joelzamboni

+1

shushugah avatar Feb 25 '18 02:02 shushugah

+1

Kaisky avatar Feb 25 '18 03:02 Kaisky

+1

NetSensors avatar Feb 25 '18 08:02 NetSensors

{:+1="_one_more_year"}

IeiuniumLux avatar Feb 26 '18 16:02 IeiuniumLux

+1

CaptainDredge avatar Mar 05 '18 07:03 CaptainDredge

+1

jonsgity avatar Mar 08 '18 03:03 jonsgity

+1

fathertime100 avatar Mar 13 '18 07:03 fathertime100

+1

NickLiffen avatar Mar 14 '18 19:03 NickLiffen

+1... lol.

r3faat1 avatar Mar 19 '18 10:03 r3faat1

+1

jvtao21 avatar Mar 21 '18 23:03 jvtao21

+1

msteger93 avatar Mar 24 '18 21:03 msteger93

+1

mmajcica avatar Mar 26 '18 11:03 mmajcica

+1

ebeltran1981 avatar Mar 27 '18 14:03 ebeltran1981

+1

KevinNovak avatar Mar 28 '18 02:03 KevinNovak

+1

mugithi avatar Apr 01 '18 22:04 mugithi

+1

This has long been overdue.

@github Any updates?

aravindvnair99 avatar Apr 02 '18 19:04 aravindvnair99

+1

juniorcesarabreu avatar Apr 03 '18 23:04 juniorcesarabreu

+1

markesejd avatar Apr 04 '18 13:04 markesejd

+1

CodeDmitry avatar Apr 05 '18 22:04 CodeDmitry

+1

domrod avatar Apr 12 '18 14:04 domrod

+1

TheBestPessimist avatar Apr 12 '18 16:04 TheBestPessimist

Users, please stop write +1. Use reactions (Emojis) at first post.

Collaborators, please lock this conversation.

AlexWayfer avatar Apr 12 '18 16:04 AlexWayfer

+1

exodus4d avatar Apr 13 '18 13:04 exodus4d

Is this being seriously considered? Leaving a project page is bad user experience in most cases and just involves going back and forth. At least having the option would be nice.

KevinNovak avatar Apr 15 '18 02:04 KevinNovak

+1

jpcmf avatar Apr 20 '18 20:04 jpcmf

+1

DanSilva41 avatar Apr 28 '18 14:04 DanSilva41

+1

madison-codes avatar May 12 '18 04:05 madison-codes

+1

seongbae avatar May 12 '18 16:05 seongbae

+1

vladmorosanu97 avatar May 12 '18 18:05 vladmorosanu97

+1 - I'm surprised opening links in a new window isn't already a built-in feature, this is a basic function that should be implemented

riomyers avatar May 13 '18 01:05 riomyers

+1

starikcetin avatar May 23 '18 22:05 starikcetin

+1

Harti avatar Jun 06 '18 10:06 Harti

+1

aleshchev avatar Jun 15 '18 08:06 aleshchev

+1

rjouhann avatar Jun 15 '18 20:06 rjouhann

+1 - I'm surprised opening links in a new window isn't already a built-in feature, this is a basic function that should be implemented

RafaelBroseghini avatar Jun 24 '18 17:06 RafaelBroseghini

How many +1 do we need to implement this feature?

roberto910907 avatar Jun 24 '18 17:06 roberto910907

Looks like @AlexWayfer took their sweet time to downvote all the comments. Impressive to be honest.

starikcetin avatar Jun 24 '18 18:06 starikcetin

@starikcetin Only "+1" unhelpful comments. I've asked to not write this… rubbish, and rate the first comment (issue starting).

AlexWayfer avatar Jun 24 '18 19:06 AlexWayfer

I don't want to someone leaves my readme/wiki page back and forth while navigating. It's actually very sad to see no one gave a fuck on this issue. :-1:

shinebayar-g avatar Jun 25 '18 13:06 shinebayar-g

I don't want to someone leaves my readme/wiki page back and forth while navigating.

Use HTML <a> tag.

AlexWayfer avatar Jun 25 '18 13:06 AlexWayfer

Use HTML <a> tag.

You mean this? <a href="https://www.google.com/" target="_blank">google.com</a>

Not working.

shinebayar-g avatar Jun 25 '18 14:06 shinebayar-g

+1

ttodua avatar Jun 26 '18 13:06 ttodua

++1 2 plus signs to check if AlexWayfer has a bot in the background or is srsly doing this manually ^^

Makoehle avatar Jul 16 '18 06:07 Makoehle

as in many cases, the devs doesnt mind our +1 or upvotes. if they wanted to do that, they could have done in 2012, in several days after opening this topic, because it doesn't need much thinking, that this feature will be needed by many people. just, they say NO.
It will be a bad more sign and unprofessionalism of devs, if they fixed this problem at this moment (after 6 years of raising the issue). so, i suppose this is "won't fix".

ttodua avatar Jul 16 '18 07:07 ttodua

2 plus signs to check if AlexWayfer has a bot in the background or is srsly doing this manually ^^

I don't want to waste time for a bot.

I'm subscribed to this issue (via button at the right menu), and I'm receiving many useless +1 in my email, and I don't want to receive them. I've asked about this, but people don't want to hear others.


I was wrong with <a> tag suggestion, I didn't think that GitHub cuts attributes from tags. My bad.

AlexWayfer avatar Jul 16 '18 09:07 AlexWayfer

+1

guylepage3 avatar Jul 16 '18 15:07 guylepage3

@AlexWayfer image

Harti avatar Jul 16 '18 16:07 Harti

@Harti, I want to get updates of this issue. +1 is not update.

AlexWayfer avatar Jul 16 '18 18:07 AlexWayfer

Just set yourself a reminder then, every year. Put the link in the reminder‘s notes, or bookmark the issue.

Chances are this will still be open and unresolved every time you view it.

But getting salty because other people are using this platform to nag the developers to tackle this actually important feature, and are disturbing your inbox peace, is ridiculously childish and entitled.

Harti avatar Jul 16 '18 18:07 Harti

Just set yourself a reminder then, every year. Put the link in the reminder‘s notes, or bookmark the issue.

Just don't write +1. It's pointless.

Instead of every interested person like me changing subscription to issue to a reminder, I'm trying to change the whole situation, make public issue discussions more informative. One situation, one rule, instead of many moves of many people.

But getting salty

I'm just trying to make this place better, without aggression.

because other people are using this platform to nag the developers to tackle this actually important feature

No, +1 doesn't nag the developers. If they will want to do something from issues of this projects — they'll use sorting by 👍, I'm pretty sure. Look, this issue is already the first: https://github.com/mojombo/github-flavored-markdown/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

And +1 comments don't help for this sorting, nor don't nag the developers, nor don't give some useful information for all 80 participants of this issue.

So, please, use 👍 button at the issue-starting comment, subscribe if you want to watch for this issue, and be free. +1 comments are obsolete, before emotions buttons feature. Don't litter emails of dozens of people with absolute trash like +1 comments.

AlexWayfer avatar Jul 16 '18 18:07 AlexWayfer

Just unsubscribe from it. You're creating more spam, thus making me truly wonder if alleviating spam is truly your desire rather than just a simple pet peeve that people aren't using the system the way you desire it to be used.

jamesjwilson avatar Jul 16 '18 19:07 jamesjwilson

Just unsubscribe from it.

No.

You're creating more spam

No.

AlexWayfer avatar Jul 16 '18 19:07 AlexWayfer

No.

Yes.

No.

Yes.

jamesjwilson avatar Jul 16 '18 19:07 jamesjwilson

Yes.

I'll not.

Yes.

Just count before you claim in order not to be a liar.

AlexWayfer avatar Jul 16 '18 19:07 AlexWayfer

I just wanted to prove that you had no desire to clean up spam. Thank you for making that way easier than I anticipated. Now we know we can just ignore your nonsense and have a clear conscious of doing so.

jamesjwilson avatar Jul 16 '18 19:07 jamesjwilson

+1

GITHUB Y U NO

Clippy, help?

m52go avatar Aug 16 '18 15:08 m52go