Open link in new tab or new window ✅

Hi all,

after finally resolving my board issues (through re-installing from scratch and re-importing manually my db now running under mysql), here I am back…

A feature that would, in, my opinion, be really helpful is to have links opening in a new browser tab / new browser window as default behaviour (adding target=“_blank” property to links)

Any idea about how to implement this ? (Maybe a plugin exists already to achieve it and I’ve not seen it ?) Or could it be added to the roadmap for a future release ?
Thanks in advance,
eM

Welcome back!

Sorry, if I didn’t understand your request. But isn’t that a browser topic?
For me here with Firefox:

  • Click opens in same window and tab.
  • Shift-Click opens in a new window.
  • Ctrl-Click opens in a new tab in background (not focused)
  • Shift-Ctrl-Click opens in a new tab in foreground (focused)
1 Like

@emzeweb:
I am not sure what exactly your desire might be, also see that more as a browser issue. But – if you haven’t already done – maybe you want to try:

<a href="http://example.com/" target="_blank">example which opens in new Tab</a>   

example which opens in new Tab


<a href="http://example.com/">example which opens here</a>  

example which opens here


In KANBOARD this will work with installed Plugin ‘MarkdownPlus’

This doesn’t affect the internal links from KB, e.g., to display a task from the board display.

And BTW, even I have the MarkdownPlus plugin installed as well, I’m quite sure it doesn’t alter this behavior.

hi,

sorry if I wasn’t explicit enough in my request. my idea was to find a user-friendly way (i.e. addition in the formatting shortcuts bar, or change in the default behaviour) to make external links open in new tab.
but as you pointed out, this is more a browser usage question, and I guess I’ll just have to make the board users get the habit of ctrl-clicking the links…

thanks for reminding me of the possibilities offered by the browser itself…

as far as Markdown Plus plugin is concerned, it won’t help me here since the end-users of our kanboard are not used to writing html…

2 Likes

the user friendly way, would be to force the behavior, by overriding the template that creates the behavior.

although now im confused:

as far as i can see, it has target = “_blank”

Yes, whatever you add explicitly as external link to a task, will get opened detached. But there are many other links within KB.

well, yeah, I get what you mean by adding a URL “explicitly as external link to a task” but it’s definitely not the way we do it… I was thinking about the links that are included in the Task Description… but it’ll be alright with ctrl+click. thanks for looking into it anyway.

1 Like

oh, so you want the links in the Description to open in a new tab. That runs through parsedown. that is easy to do.

add 'target' => "_blank", after line 1421. Should do the trick.

If you want more stuff to open in a new tab, there really are only a handfull of places links get interpreted, so its not hard to get them all.

2 Likes

and 90% of them run through parsedown. 90% is arbitrary, i made that up, but definately “most” links are handled through parsedown. might even be 100% if we are strictly referring to commonly made user links.

And between parsedown and the UrlHelper, might be close to 100% absolute.

Here all you need to do is make the default $newTab value true.

1 Like

hey, @creecros, thanks a lot ! this seems to do the trick !!

1 Like

Hi all,

long time no see ! and long time since I last updated kanboard too…(my small organization was still using release 1.2.40…)

I updated yesterday to 1.2.49, but the folder /erusev/ is no longer present in the /vendor/ directory. so I don’t know where to make my usual little addition to the code in order to make links open in new tab.. i f anyone can help, that’d be really appreciated !

Many thanks. and happy new year all. hope 2026 will be nice and gentle to you and your close ones.

Seems to have been removed in the latest release.

I can not find it in the current plugin directory, so you may have to hardcode the links as per other suggestions above.

I can’t make this method work in version 1.2.49…

if i change the default value for $newTab parameter in /app/Helper/UrlHelper.php the behavior is the exact opposite of what I need :rofl: : all links open new tabs (when i click on the title of the task, when i click on “modify task” etc…) BUT the ones in the task description…

Parsedown?

Never was in the vendor folder.

1 Like

hey thanks for stopping by !

apparently erusev folder was in vendor directory back in 2022 (from your own post at this time)… anyway, thanks for pointing me in the right direction ! happy new year folks

1 Like