Some questions for botpress

We have some further questions on botpress.

  1. Whether we could add a link into the dialogue where, customer can click to browse a new page.
  2. When customer click the button or link, whether it is possible to open a new label in the chat window other than a new label in the browser
    link & button

Probably I did not get your question correctly
however, you can add links with markdown and markdown link also support [link](url){:target="_blank"}
If I was completely wrong, sorry probably I am to new to botpress

Hi,Dear Neofila: Thanks for your help. We may not make ourself very clear. What we would like to have is, whether we could display the link content with a popup window in BP, not a browser page. Please kindly comment whether it is possible. Thanks again.

Therefore, I believe that this post can help you out

Hi, Neofila:
We feel that, if we open a new page in browser, the user experience maynot very good. So we wonder whether it is possible to open the link/button in botpress box.

Please refer the diagram below, when we click on the link/button, botpress popup a dialogue window, that will be great.

if you do not want to create a module, as suggested on the post botpress/examples/custom-component at master · botpress/botpress · GitHub.
You can always try to create a javascript with an event (I did not try, but should be possible).

Hi PaulYang,

Neofila is correct- there is no built-in way to do link previews in Botpress, but you can write your own custom code to accomplish this. However, if you’re willing to cheat a little bit, you can fake this feature with the image content type. Just take a screenshot of the website and use that as the image, and have a link to it below. This gets you most of the way there without needing to write additional code!

Got it! Thanks for your great help!

You can add an iframe in your text message

Hie @PaulYang, thank you very much for your question.

If you want to display the webpage in the web channel’s chat interface then you ca simply include HTML in a text content element. The HTML will be rendered correctly and you can use the <iframe> tag to include a web page.

Because we have this functionality, you can also include a script tag in your text content element and place code to display what you want for example using fetch()