EnrichedMarkdownText runs on web using react-native-web for the React Native primitives and md4c compiled to WebAssembly for parsing. The WASM binary is bundled in the npm package — no build step is required by consumers.
The web renderer uses semantic HTML elements (<p>, <h1>–<h6>, <blockquote>, <ul>, <ol>, <table>, etc.) for improved accessibility.
All core EnrichedMarkdownText features are supported on web, including:
- Full GFM: tables (with horizontal scroll), task lists (with checkbox interaction), strikethrough, links, images (block and inline), code blocks, LaTeX math (block and inline)
- All
markdownStylecustomisation options onLinkPress,onLinkLongPress(mapped tocontextmenuevent),onTaskListItemPresscallbacksallowTrailingMargin,containerStyle,selectable,selectionColor,md4cFlags(underline,latexMath)- RTL support via the
dirprop (CSS logical properties automatically flip blockquote borders, list indentation, etc.)
- Semantic HTML elements for all markdown structures
- Images:
alttext falls back totitle, then URL filename, then"Image" - Code blocks:
aria-labelwith language when available (e.g."Code block: python") - Math (KaTeX fallback):
role="math"andaria-labelwith the expression content - Task list checkboxes:
aria-labelwith the task text (e.g."Task: Buy groceries")
| Prop | Description |
|---|---|
dir |
Sets the text direction on the root container ('ltr', 'rtl', or 'auto'). CSS logical properties in the renderers automatically flip layout for RTL. |
The web implementation also exports WebMarkdownTextProps which extends EnrichedMarkdownTextProps with the web-only props above.
| Prop | Reason |
|---|---|
flavor |
The web renderer always uses full GFM capabilities. On native, flavor controls whether a single TextView (CommonMark) or container-based renderer (GitHub) is used; the DOM has no such constraint. |
enableLinkPreview |
iOS-only feature (native link preview on long press). |
allowFontScaling / maxFontSizeMultiplier |
React Native text scaling props. Browsers handle font scaling natively via OS accessibility settings. |
streamingAnimation |
Native-only tail fade-in animation. Not yet implemented on web. |
streamingConfig |
Native-only streaming table configuration. Not yet implemented on web. |
contextMenuItems |
Not supported — browsers don't allow extending the native context menu. |
selectionMenuConfig |
Not supported — native-only built-in selection menu actions. |
selectionHandleColor |
Android-only — desktop browsers don't render selection handles. |
EnrichedMarkdownTextInput— native-only- Configurable link
target— all links open in a new tab (target="_blank"). UseonLinkPressfor custom navigation.