Skip to content

HTML import and export

To convert HTML to RichTextState, use RichTextState.setHtml method:

val html = "<p><b>Compose Rich Editor</b></p>"
richTextState.setHtml(html)

To convert RichTextState to HTML, use RichTextState.toHtml method:

val html = richTextState.toHtml()