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

A link provided by chatbot should open in a new tab #387

Open
TamiTakamiya opened this issue Jan 2, 2025 · 1 comment
Open

A link provided by chatbot should open in a new tab #387

TamiTakamiya opened this issue Jan 2, 2025 · 1 comment
Labels
PF6 Applies to only the PF6 version

Comments

@TamiTakamiya
Copy link

When a link is included in the response markdown doc, currently clicking the link opens it in the current (=chatbot) tab and user has to click browser's back button to restrore the chatbot window. We want to change it to open the link in a new tab.

I did a small research and found the rehype-external-links rehype pluing would be used for that purpose, i.e., by modifying the Message.tsx in the following way:

import rehypeExternalLinks from 'rehype-external-links';
    :
              <Markdown
                   :
                rehypePlugins={[
                  [rehypeExternalLinks, { target: '_blank' }],
                ]}
              >

the link would be opened in a new tab.

Would you implement this on patternfly/chatbot? Thanks.

@github-project-automation github-project-automation bot moved this to Needs triage in PatternFly Issues Jan 2, 2025
@rebeccaalpert rebeccaalpert added the PF6 Applies to only the PF6 version label Jan 3, 2025
@rebeccaalpert
Copy link
Member

Let me bring this up with the team to make sure this is something they'd be ok with!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PF6 Applies to only the PF6 version
Projects
Status: Needs triage
Development

No branches or pull requests

2 participants