Rich Text Lexical React Native

Renders serialized Lexical rich text from Payload CMS in React Native apps using native primitives with overridable converters.

Community 0 MIT v0.1.1

Installation

pnpm add @lizardglobal/payload-richtext-lexical-react-native

About

This package is a fork of `@payloadcms/richtext-lexical` that adds a React Native rendering entry point for the serialized Lexical content Payload's rich text field produces. You pass the editor state JSON to a `RichText` component imported from the `@lizardglobal/payload-richtext-lexical-react-native/react-native` subpath, and it renders the document tree using native primitives such as `View`, `Text`, `Image`, and `Pressable`. The renderer ships built-in converters for the standard node types: blockquote, heading, horizontal rule, line break, link, list, paragraph, tab, table, text, and upload. Each converter can be replaced via a `converters` prop, and the underlying primitives can be swapped through a `primitives` prop so the output matches an app's design system. Because React Native has no built-in link handling, external links are routed through an `onExternalLinkPress` callback that you implement, typically with `Linking.openURL`. Beyond the component, the package exports lower-level helpers for callers that want more control: `convertLexicalToReactNative`, `convertLexicalNodesToReactNative`, `defaultReactNativeConverters`, and `defaultReactNativePrimitives`. The API is intentionally close to the existing React renderer so most call sites can move over with small changes, while converter overrides absorb platform-specific behavior such as internal navigation for relationship links. The package is still experimental at 0.1.1. The README warns that APIs, schema shapes, and behavior may change without a stability guarantee, and it lists known edge cases including unknown custom node types, internal link resolution, performance on large document trees, table layout, image handling, and URL defaults. It pins to Payload 3.80, React 19, and `react-native` 0.72 or newer as peers.

Package info

Package name
@lizardglobal/payload-richtext-lexical-react-native
Latest version
0.1.1
Unpacked size
5 MB
License
MIT
Last publish
Jul 29, 2026

More from LizardGlobalGH

View profile

Similar plugins

More in Content