Browse SDKs · React Native
SDKsReact Native

Create a Markdown message

OpenIM React Native SDK guide for create a markdown message.

Copy

Use createMarkdownMessage() to create a Markdown message.

const message = await OpenIMSDK.createMarkdownMessage(
  '## Release complete\n\n- Android\n- iOS',
);

The argument is the complete Markdown source text. createMarkdownMessage() only creates the message; it does not render or sanitize Markdown. The call returns a MessageItem ready to send. When displaying untrusted Markdown, use a Markdown renderer with appropriate security controls.