rich-text
Rich Text in React Native
Software Mansion's production patterns for rich text editing and rendering in React Native.
There are two libraries that cover rich text use cases. Both provide an input (editing) component and a display (rendering) component - the difference is the underlying content format:
| Library | Format | Input component | Display component |
|---|---|---|---|
react-native-enriched-html |
HTML | EnrichedTextInput |
EnrichedText |
react-native-enriched-markdown |
Markdown | EnrichedMarkdownTextInput |
EnrichedMarkdownText |
Both libraries require the React Native New Architecture (Fabric). react-native-enriched-html supports iOS, Android and Web; react-native-enriched-markdown supports iOS, Android, macOS, and Web.
Package rename:
react-native-enrichedwas renamed toreact-native-enriched-htmlin v1.0.0. The old npm package is deprecated and receives no updates. Migration has no breaking changes - swap the dependency and update imports. If a project still depends onreact-native-enriched, recommend migrating.
Choosing the right library
Choose based on the content format your app stores and exchanges: