Skip to content

Commit

Permalink
docs(ai-chat-log): doucment how to animate markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
krisantrobus committed Jan 22, 2025
1 parent 4d47a2d commit 9fe763e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ The `AIChatMessageBody` component has an optional `animated` prop that can be us

It also accepts `onAnimationStart` and `onAnimationEnd` props to trigger actions when the animation starts and ends allowing additional logic such as scrolling to be implemented.

If you are using a Markdown parser to render the message body we recommend using [markdown-to-jsx](https://www.npmjs.com/package/markdown-to-jsx). It allows you to pass in paste elements to replace specific markdown elements. You can view our implementation for the [Paste Assistant](/assistant) for an example. [AIChatMessageBody implementation](https://github.com/twilio-labs/paste/blob/main/packages/paste-website/src/components/assistant/AssistantMessage.tsx#L27), [Markdown options implementation](https://github.com/twilio-labs/paste/blob/main/packages/paste-website/src/components/assistant/AssistantMarkdown.tsx#L46)
If you are using a Markdown parser to render the message body we recommend using [markdown-to-jsx](https://www.npmjs.com/package/markdown-to-jsx). It allows you to pass in Paste components to replace specific markdown elements. You can view our implementation for the [Paste Assistant](/assistant) for an example. [AIChatMessageBody implementation](https://github.com/twilio-labs/paste/blob/main/packages/paste-website/src/components/assistant/AssistantMessage.tsx#L27), [Markdown options implementation](https://github.com/twilio-labs/paste/blob/main/packages/paste-website/src/components/assistant/AssistantMarkdown.tsx#L46)

<LivePreview
scope={{
Expand Down

0 comments on commit 9fe763e

Please sign in to comment.