Add Target _blank to a link?

Is there a way to add a target _blank to a hyperlink in paragraph text? I can add it for a link inside a UL element, but not in a paragraph element. Thanks!

Have you bothered to look at the options pane yet?

Yup - like I said, I can do it for a link in a UL element. But inside a paragraph the option is not there. It appears if I drag a link element into the paragraph then I can. But if I add a link by highlighting text in a paragraph I cannot.

Hey, but thanks for the help :)

Ahhh ok I see what you mean now. Yes you are right, it is not there, they are very aware of it and although we've hoped for more features for the links created with the Edit bar within Paragraphs etc. we have not seen them yet. For now your best bet, when you need full control of a link, is to drag a LINK component to the location within the paragraph that you need it in. They mesh very nicely and that really is the only inconvenience is that you have to drag one in there. Then you have full control of the link.

I only use links that are built with the text edit system when I am using internal links that I don't need to add the "target" or any other attribute to. They work great if you're just referencing something within the site that the visitors can just go to. Just don't use them for external link purposes and you'll be fine. :)

1 Like

Yeah, seems like an oversight, as the HTML for each is identical. I added it as a feature request here:

You could create a class for this called target-blank and then apply that to the paragraph.

Then add a small bit of javascript.

document.querySelectorAll(".target-blank a").forEach(function(a){
  a.setAttribute('target', '_blank');

The only reason I mention this is if someone had lots of links that would open in new tabs and found dragging links into many paragraphs cumbersome.

Seems like a lot of extra hassle @twinstream for something that should really be there inertly in the app in both places, not just one. Nice work around though, but dragging a link into a paragraph is a whole lot less hassle for me :stuck_out_tongue:

Here is another example

1 Like