Web Support

May 6, 2026 · View on GitHub

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.

Supported features

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 markdownStyle customisation options
  • onLinkPress, onLinkLongPress (mapped to contextmenu event), onTaskListItemPress callbacks
  • allowTrailingMargin, containerStyle, selectable, selectionColor, md4cFlags (underline, superscript, subscript, latexMath)
  • RTL support via the dir prop (CSS logical properties automatically flip blockquote borders, list indentation, etc.)

Accessibility

  • Semantic HTML elements for all markdown structures
  • Images: alt text falls back to title, then URL filename, then "Image"
  • Code blocks: aria-label with language when available (e.g. "Code block: python")
  • Math (KaTeX fallback): role="math" and aria-label with the expression content
  • Task list checkboxes: aria-label with the task text (e.g. "Task: Buy groceries")

Web-only props

PropDescription
dirSets 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.

Ignored props (native-only)

PropReason
flavorThe 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.
enableLinkPreviewiOS-only feature (native link preview on long press).
allowFontScaling / maxFontSizeMultiplierReact Native text scaling props. Browsers handle font scaling natively via OS accessibility settings.
streamingAnimationNative-only tail fade-in animation. Not yet implemented on web.
streamingConfigNative-only streaming table configuration. Not yet implemented on web.
contextMenuItemsNot supported — browsers don't allow extending the native context menu.
selectionMenuConfigNot supported — native-only built-in selection menu actions.
selectionHandleColorAndroid-only — desktop browsers don't render selection handles.

Not supported on web

  • EnrichedMarkdownTextInput — native-only
  • Configurable link target — all links open in a new tab (target="_blank"). Use onLinkPress for custom navigation.