用于渲染聊天文本消息的组件。
| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
isMarkdown |
boolean |
✅ | - | 将文本渲染为 markdown(默认值 = true) |
text |
string |
✅ | - | 文本消息 |
import { RtkTextMessageView } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkTextMessageView />;
}import { RtkTextMessageView } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkTextMessageView
isMarkdown={true}
text="example"
/>
);
}