Renders the box that replaces a chat message's text while its author, or a moderator, edits it in the chat modal.
f
ChatEditBox(unnamed 0: ChatEditBoxProps): React.JSX.Element
Renders the field every text edited in place gets, InlineEditField, with
Enter saving and Shift+Enter starting a new line, as in the composer. It
scrolls itself into the list's view.
I
ChatEditBoxProps
Passed to ChatEditBox by ChatMessageItem while it is editing.
- initial: string
-
onClose: () => void
Called once the text is saved, or left, Escape included.
-
onSave: (body: string) => void
Receives the trimmed text, only when it changed and can be sent.
Usage
import * as mod from "src/components/chat/ChatEditBox.tsx";