Closed iRaM-sAgOr closed 2 years ago
@iRaM-sAgOr Thank you for your question.
Sure you can use react-linkify.
Here is the example:
<Message model={{ direction: "incoming"}}>
<Message.CustomContent>
<Linkify componentDecorator={(decoratedHref, decoratedText, key) =>
<a target="blank" rel="noopener" href={decoratedHref} key={key}>{decoratedText}</a>}>
This message contains link to the https://chatscope.io website.<br />
This link is clickable thanks to the https://github.com/tasti/react-linkify library.
</Linkify>
</Message.CustomContent>
</Message>
Storybook example: Chat message with clickable links using react-linkify