Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open link in new page #28

Open
AliMD opened this issue Nov 23, 2012 · 227 comments
Open

open link in new page #28

AliMD opened this issue Nov 23, 2012 · 227 comments

Comments

@AliMD
Copy link

AliMD commented Nov 23, 2012

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

@skeggse
Copy link

skeggse commented Jul 16, 2013

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

@trliner
Copy link

trliner commented Jul 14, 2014

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. 😞

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

@skeggse
Copy link

skeggse commented Jul 15, 2014

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

Ahh, interesting. I guess that makes sense.

@paulmenzel
Copy link

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

@AliMD
Copy link
Author

AliMD commented Mar 24, 2016

@paulmenzel now working in github

@trliner
Copy link

trliner commented Mar 24, 2016

@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"}

@chennighan
Copy link

chennighan commented Jun 9, 2016

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

NDuma added a commit to NDuma/oculus-rating-data that referenced this issue Jun 22, 2016
Charts / Flot on TwentyMilliseconds now points to specific post.
 - 'Trialing' "New - Tab" functionality -> (Does not appear to be supported in either html or gitmkdn here > contrary to 4 StackEx tabs + 1 Git "mojombo/github-flavored-markdown#28")
@RichardHightower
Copy link

test

@DenysVuika
Copy link

The issue is still open since 23 Nov 2012

@gautamkrishnar
Copy link

Looks like it is not working...

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

@datapolitan
Copy link

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

@exexzian
Copy link

exexzian commented Apr 1, 2017

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

@Nerajno
Copy link

Nerajno commented Sep 14, 2017

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

@0xFFrancesco
Copy link

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

@grv87
Copy link

grv87 commented Oct 4, 2017

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

@seneca-wolf
Copy link

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.

@SvenJedeck
Copy link

This is really sad

@redhatstuart
Copy link

Also have a need for this.

@coderberry
Copy link

Same here

@juanroldan1989
Copy link

Ditto

@gabrielnieves18
Copy link

+1

@elijah-io
Copy link

Bump.

@Zarquan
Copy link

Zarquan commented Nov 24, 2017

+1

@ghost
Copy link

ghost commented Nov 26, 2017

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

@JamesAndersonJr
Copy link

+1

@KTibow
Copy link

KTibow commented Feb 22, 2023

commenting here will:

  • notify a hundred people

commenting here will not:

  • make github care

@aravindvnair99
Copy link

+1 to @KTibow

However, I also feel this is the wrong repository. @mojombo can you confirm?

The official discussion forum is here - https://github.com/orgs/community/discussions

@KTibow
Copy link

KTibow commented Feb 26, 2023

already opened suggestion: https://github.com/orgs/community/discussions/38634
i doubt mojombo will respond

@ankitkat042
Copy link

I often end up here looking for a solution for the same problem and realise that there is no solution for this till now, forget it and continue my work

@nexushoratio
Copy link

-1 to implementing this. As a user, I absolutely hate it. It is a pox on mankind.

@AliMD
Copy link
Author

AliMD commented Sep 27, 2023

-1 to implementing this. As a user, I absolutely hate it. It is a pox on mankind.

-1 to you

@alan23273850
Copy link

@nexushoratio You did not mention why.

@nexushoratio
Copy link

@nexushoratio You did not mention why.

As a user, I know how to open links in new windows/tabs. Generally a simple middle-click. But, I have a choice. I may want to follow a link in the current window/tab. It is not unusual for me to click a link to have it forcibly open in a new context. So I then have to close the current one and navigate to the new one. My choice was taken away from me.

There are few scenarios where opening a new window/tab by default makes sense. Help on a form is probably the biggest. And I don't think Markdown supports much in the way of forms.

@KTibow
Copy link

KTibow commented Sep 27, 2023

My choice was taken away from me.

you can still open it in the current tab if you want:

  • right-click > press l (copy link address) > press ctrl+l > press ctrl+v
  • drag > drop onto address bar

@AlexWayfer
Copy link

As a user, I know how to open links in new windows/tabs. Generally a simple middle-click. But, I have a choice. I may want to follow a link in the current window/tab. It is not unusual for me to click a link to have it forcibly open in a new context. So I then have to close the current one and navigate to the new one. My choice was taken away from me.

Probably, you should fill report to browsers. If they have support for middle mouse button or ctrl+lmb for forcing a new tab, probably they should have some key bindings for forcing the current tab, like alt-lmb, ctrl-mmb or something.

@shannaniggans
Copy link

Given the links i provide are to external tools to support the walkthroughs and courses, it is still annoying 13 years later ....

@MoElaSec
Copy link

MoElaSec commented Dec 5, 2023

Happy New Year everyone it's "almost" 2024 🥳🎊

Fun Facts:

  • This issue is 11 years+ old.

  • The world population hit 8 billion his year (now at 8.1), which makes around 80 million people younger than this issue.

  • 💀 Pyrenean ibex was officially declared extinct this year.

  • GTA VI will be released before this issue is closed. (reminder today is the release date trailer 🙌)

  • At least 152 Github users will be happy if this gets supported:

    [link](URL){:target="_blank" rel="noopener noreferrer"}

@mhguelleh
Copy link

It's hard for me to believe GTA V came out after this issue and GTA VI will be released before this issue is ever fixed 🤯

geoffreyvanwyk added a commit to geoffreyvanwyk/cookiecutter-ansible-role that referenced this issue Jan 5, 2024
Add the screen recording to the README.md file as an image displaying a
screenshot of the recording that links to https://asciinema.org where
the screen recording can be played. The screen recording itself cannot
be embedded in the README.md because GitHub does not allow `script` HTML
tags.

The link cannot be opened in a new tab because GitHub Markdown does not support
it. See mojombo/github-flavored-markdown#28

Using `svg-term-cli` to create an animated SVG does not work, because it
does not play smoothly and does not use the settings applied to the cast
on asciinema.org.

Update dictionary for VS Code workspace to fix spelling errors.

Issues: #11
geoffreyvanwyk added a commit to geoffreyvanwyk/cookiecutter-ansible-role that referenced this issue Jan 5, 2024
Add the screen recording to the README.md file as an image displaying a
screenshot of the recording that links to https://asciinema.org where
the screen recording can be played. The screen recording itself cannot
be embedded in the README.md because GitHub does not allow `script` HTML
tags.

The link cannot be opened in a new tab because GitHub Markdown does not support
it. See mojombo/github-flavored-markdown#28

Using `svg-term-cli` to create an animated SVG does not work, because it
does not play smoothly and does not use the settings applied to the cast
on asciinema.org.

Update dictionary for VS Code workspace to fix spelling errors.

Issues: #11
@ADV1K
Copy link

ADV1K commented Feb 18, 2024

This has to be the oldest and most annoying issue I've ever seen.

I won't be surprised if I come back again searching for this next year.

@lnfel
Copy link

lnfel commented May 9, 2024

I'm leaving my mark in history (at least in this goddamn issue thread).

@sivarohithm
Copy link

Waiting 1 Million years

@prasku5
Copy link

prasku5 commented Jul 26, 2024

I will check my comment in the next birth while this issue persists.

@harshadsheelwant
Copy link

Doom-scrolling this issue is my new favorite pass time hobby.

@spookyahell
Copy link

I know this won't change it...
just wanted to be part of the people saying "Yes, I want this."

funny how I've been adding a target with no effect for years on GitHub. FML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests