ShortCutFormatter
class extends the CometChatTextFormatter class to provide a mechanism for handling shortcuts within messages. This guide will walk you through the process of using ShortCutFormatter
to implement shortcut extensions in your CometChat application.
ShortCutFormatter
for CometChat using the CometChatTextFormatter:
CometChatTextFormatter
from the CometChat UI Kit react library.CometChatTextFormatter
class to create your custom text formatter class. In this case, let’s create a HashTagTextFormatter
.trackCharacter
and define any necessary private fields.onKeyDown
method to handle key events and trigger actions based on defined shortcuts.