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

Add ability to open markdown links in new tab #2679

Closed
KDean-Dolphin opened this issue Aug 20, 2024 · 2 comments
Closed

Add ability to open markdown links in new tab #2679

KDean-Dolphin opened this issue Aug 20, 2024 · 2 comments
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Milestone

Comments

@KDean-Dolphin
Copy link

Search Terms

markdown link target _blank

Problem

The sourceLinkExternal option allows me to open links in a new tab when generating HTML. I would like to see a similar option for links in the markdown itself.

Suggested Solution

Markdown links are, as designed, processed by markdown-it. However, it's possible to add a target="_blank" to all links through the use of a custom renderer. This should be enabled through an option in the generator.

@KDean-Dolphin KDean-Dolphin added the enhancement Improved functionality label Aug 20, 2024
@KDean-Dolphin
Copy link
Author

To add to this, now that I've converted all my links to use @link instead, this ability would be nice for any @link that is a URL.

@Gerrit0 Gerrit0 added help wanted Contributions are especially encouraged good first issue Easier issue for first time contributors labels Aug 21, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 23, 2024

TypeDoc renders @link to markdown before passing it to markdown-it, so the one option will pick up both cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged
Projects
None yet
Development

No branches or pull requests

2 participants