Skip to content

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

@TamiTakamiya

Description

@TamiTakamiya

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.

Metadata

Metadata

Assignees

Labels

PF6Applies to only the PF6 version

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions