Skip to content

Support clickable links + onLinkPress/linkStyle props in Reader content #20

@danishsshaikh

Description

@danishsshaikh

🧩 What problem does this solve?

react-native-reader renders article content beautifully, but links inside the HTML body aren’t interactive by default. Many articles contain inline references, footnotes, or external sources that should be tappable.


💡 Proposed solution

Enhance the Reader so that <a href="..."> tags are rendered as clickable text.

New optional props:

  • onLinkPress?: (href: string, attribs?: Record<string, string>) => void
    • Custom callback for when a link is pressed.
    • Defaults to Linking.openURL(href) if not provided.
  • linkStyle?: TextStyle
    • Allows customizing the visual style of links (e.g. color, underline).

🧭 Why this belongs in react-native-reader

The Reader already supports passing html and exposes react-native-htmlview props.
Adding first-class support for clickable links keeps the reading experience accessible and consistent with the library’s purpose.

Happy to open a PR implementing this feature <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions