Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cometchat-22654f5b-react-uikit-v7.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

FieldValue
Plugin IDtext
Package@cometchat/chat-uikit-react
Message Typestext
Message Categoriesmessage
Included by DefaultYes
Bubble ComponentCometChatTextBubble
Conversation PreviewMessage text (markdown stripped, mentions resolved)
Context MenuReact, Reply, Reply in Thread, Copy, Edit, Info, Delete, Report, Mark Unread, Message Privately

Overview

The Text plugin handles messages of type text in category message. It renders formatted text with support for @mentions, clickable URLs, and markdown syntax (bold, italic, strikethrough, code, blockquotes, lists).

Bubble Rendering

The text bubble displays the message text after running it through the formatter pipeline:
  1. Markdown**bold**, _italic_, ~~strike~~, `code`, > blockquote, lists
  2. Mentions<@uid:xxx> tokens → styled @DisplayName chips
  3. URLs — bare URLs → clickable links with target="_blank"
Long messages are truncated with a “Read more” toggle (configurable via disableTruncation in the plugin context).

Context Menu Options

OptionConditionAction
ReactAlwaysOpens emoji picker
ReplyAlwaysSets reply-to in composer
Reply in ThreadNot in threadOpens thread view
CopyAlwaysCopies plain text (markdown stripped, mentions resolved) to clipboard
EditSender onlyEnters edit mode in composer
InfoSender onlyOpens message info panel
DeleteSender onlyShows delete confirmation
ReportReceiver onlyOpens flag/report dialog
Mark UnreadReceiver onlyMarks message as unread
Message PrivatelyReceiver, group onlyOpens 1:1 chat with sender

Conversation Preview

Returns the message text with markdown stripped and mentions resolved to display names. Example: @John: Check the **docs**@John: Check the docs

Text Formatters

The text plugin provides three built-in formatters via getTextFormatters():
FormatterPriorityWhat it does
CometChatMarkdownFormatter10Converts markdown syntax to HTML
CometChatMentionsFormatter50Resolves <@uid:xxx> tokens to styled mention chips
CometChatUrlFormatter100Converts bare URLs to clickable <a> tags
Formatters run in priority order (lower = first). Each receives the output of the previous formatter. For custom formatters, see Text Formatters.

CSS Selectors

TargetSelector
Bubble root.cometchat-text-bubble
Text content.cometchat-text-bubble__text
Mention chip.cometchat-text-bubble__mention
Link.cometchat-link
Read more toggle.cometchat-text-bubble__read-more