# stump-draft-js-mention-plugin

> Mention Plugin for DraftJS

Latest version **0.0.3** (published 2020-03-19) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-03-19 |
| First published | 2020-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 63.9 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4091 |
| Author | Nik Graf |
| Maintainers | ntilwalli |
| Keywords | editor, wysiwyg, draft, react, ux, components, widget, react-component |

## Links

- npm: https://www.npmjs.com/package/stump-draft-js-mention-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/stump-draft-js-mention-plugin

## Dependencies (5)

- [clsx](https://npm.io/package/clsx.md) ^1.0.4
- [lodash](https://npm.io/package/lodash.md) ^4.17.14
- [immutable](https://npm.io/package/immutable.md) ~3.7.4
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8
- [union-class-names](https://npm.io/package/union-class-names.md) ^1.0.0

## 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

- 0.0.3 (latest) — 2020-03-19
- 0.0.1 — 2020-03-19

## README

# DraftJS Mention Plugin

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

This plugin allows you to add mentions to your editor!

Usage:

```js
import createMentionPlugin from 'draft-js-mention-plugin';

const mentionPlugin = createMentionPlugin({ mentions });
```

## Importing the default styles

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

### 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-mention-plugin/lib/plugin.css';
    ```
4. Restart Webpack.

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