SDKsReact Native
Create markdown message
Construct a formatted Markdown message using the OpenIM React Native SDK.
Construct a message containing formatted Markdown content:
const message = await OpenIMSDK.createMarkdownMessage(
'## Release Completed\n\n- Android\n- iOS',
);Parameters
Supply the full Markdown text string as the sole argument.
Return value
A resolved Promise returns the initialized MessageItem object with Markdown content stored in markdownTextElem.
This method builds the message structure strictly in client memory; it does not dispatch messages to the server or trigger lifecycle events. After initialization, invoke Send message to deliver it to a conversation. When rendering untrusted Markdown content in the UI, sanitize tags using secure renderer components.
Was this page helpful?