Skip to main content
CometChatUrlsFormatter extends CometChatTextFormatter to detect URLs in text messages and render them as clickable links.

Usage

Extend CometChatTextFormatter, set regex patterns for URL detection, and override onRegexMatch and registerEventListeners to handle formatting and click behavior.

Customization

Apply CSS to your link class:

Handling clicks

Override onUrlClick to add tracking or custom navigation:

Next Steps

Custom Text Formatter

Build custom inline text patterns.

Message List

Render real-time message threads.

All Guides

Browse all feature and formatter guides.

Sample App

Full working sample application on GitHub.