16
Views
3
Comments
[Markdown Renderer] Markdown update: link open in a new tab (_blank)
markdown-renderer
Reactive icon
Forge asset by Maxime Baracco
Application Type
Reactive

Hello,

First of all this component help us a lot. Thank you for that.

Today, we started to work on a new project and we are redering links in this component. We noticed that when identifies a link it creates an <a> tag, this is fine. But we need to open it in a new tab. So, as a sugestion, could you guys update this behavior? I think it will improve the component.


We fixed this in our side, if you guys are interested let us know.


Thanks a lot.

2024-05-17 04-26-02
Maxime Baracco

Hi Bruno,


As a quick workaround for this kind of problem, you can also insert html instead of Markdown text.

So if you use the text:

... it should open the link in a new tab.


About updating the markdown component for this, I see there are different syntaxes possible for this. What would be your preference? And how did you fix it on your side?

Thank you

2024-03-19 12-46-02
Bruno Gomes

Hello,

We change in the component:

- ConvertAndSetContainerHTML screen action

- JavaScript the "replaceContent()", we identify a link and build it  with "_blank" parameter setted.

Not sure what is the best way to go with that, but that was our change. Please let me know your thoughts.

Thanks.

replaceContent.zip
2024-05-17 04-26-02
Maxime Baracco

Hi Bruno,


Yes, that will work if you want all the links to open in new tabs. I'll check what is the most popular or easiest way to specify this in markdown syntax. Then I'll add this in the conversion, probably using the same solution like you did, but at least it will be something we can activate/deactivate for each link using markdown syntax.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.