# draft-js-linkify-plugin

> Linkify Plugin for DraftJS

Latest version **2.0.2** (published 2019-08-21) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install draft-js-linkify-plugin
pnpm add draft-js-linkify-plugin
yarn add draft-js-linkify-plugin
bun add draft-js-linkify-plugin
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2019-08-21 |
| First published | 2016-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4087 |
| Author | Nik Graf |
| Maintainers | juliankrispel, nikgraf |
| Keywords | editor, wysiwyg, draft, react, ux, components, widget, react-component |

## Links

- npm: https://www.npmjs.com/package/draft-js-linkify-plugin
- Repository: https://github.com/draft-js-plugins/draft-js-plugins
- Homepage: https://github.com/draft-js-plugins/draft-js-plugins#readme
- Issues: https://github.com/draft-js-plugins/draft-js-plugins/issues
- npm.io page: https://npm.io/package/draft-js-linkify-plugin

## Dependencies (3)

- [clsx](https://npm.io/package/clsx.md) ^1.0.4
- [tlds](https://npm.io/package/tlds.md) ^1.189.0
- [linkify-it](https://npm.io/package/linkify-it.md) ^2.0.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2019-08-21
- 2.0.0 (beta) — 2017-11-09
- 2.0.1 — 2017-11-09
- 2.0.0-rc8 — 2017-09-21
- 2.0.0-rc7 — 2017-09-13
- 2.0.0-rc5 — 2017-08-18
- 2.0.0-rc4 — 2017-08-11
- 2.0.0-rc3 — 2017-07-27
- 2.0.0-rc2 — 2017-05-25
- 2.0.0-rc1 — 2017-05-23
- 2.0.0-beta11 — 2017-05-08
- 2.0.0-beta10 — 2017-03-12
- 2.0.0-beta9 — 2016-12-09
- 2.0.0-beta8 — 2016-12-09
- 2.0.0-beta7 — 2016-11-24
- … 12 more at https://npm.io/package/draft-js-linkify-plugin/versions

## README

# DraftJS Linkify Plugin

*This is a plugin for the `draft-js-plugins-editor`.*

This plugin turns hyperlinks in the text to highlighted, clickable anchor tags!

## Usage

```js
import createLinkifyPlugin from 'draft-js-linkify-plugin';

const linkifyPlugin = createLinkifyPlugin();
```

You may also optionally set the target value for the resulting `<a>` tag:

```js
const linkifyPlugin = createLinkifyPlugin({
  target: '_blank'  // default is '_self'
});
```

## Importing the default styles

The plugin ships with a default styling available at this location in the installed package:
`node_modules/draft-js-linkify-plugin/lib/plugin.css`.

### Webpack Usage

### Webpack Usage
Follow the steps below to import the css file by using Webpack's `style-loader` and `css-loader`. 

1. Install Webpack loaders: `npm install style-loader css-loader --save-dev`
2. Add the below section to Webpack config (if your Webpack already has loaders array, simply add the below loader object(`{test:foo, loaders:bar[]}`) as an item in the array).

    ```js
    module: {
      loaders: [{
        test: /\.css$/,
        loaders: [
          'style-loader', 'css'
        ]
      }]
    }
    ```

3. Add the below import line to your component to tell Webpack to inject style to your component.

    ```js
    import 'draft-js-linkify-plugin/lib/plugin.css';
    ```
4. Restart Webpack.

---
_Source: https://npm.io/package/draft-js-linkify-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
