react-autolinker-wrapper

1.3.0 • Public • Published

react-autolinker-wrapper

React component which automatically converts URLs, email addresses, phone numbers, Twitter handles and hashtags in a string to HTML anchors.

Build Status Coverage Status Greenkeeper badge

Install

npm install react-autolinker-wrapper --save

Usage

import AutolinkerWrapper from 'react-autolinker-wrapper'
...
<AutolinkerWrapper
  tagName="span"
  text="Documentation at https://github.com/gvas/react-autolinker-wrapper"
  options={{
    newWindow: true,
    stripPrefix: false,
  }} />

Example

See the Pen rpYWQR by Vas Gábor (@gvas) on CodePen.

Properties

  • tagName: The wrapper element's tag name, default is div.
  • text: The text to autolink.
  • options: The options to invoke Autolinker with.

Credits

Gregory Jacobs' Autolinker.js library.

Readme

Keywords

Package Sidebar

Install

npm i react-autolinker-wrapper

Weekly Downloads

61

Version

1.3.0

License

MIT

Unpacked Size

34.3 kB

Total Files

9

Last publish

Collaborators

  • gvas