# draft-js-buttons

> Buttons 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-buttons
pnpm add draft-js-buttons
yarn add draft-js-buttons
bun add draft-js-buttons
```

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2019-08-21 |
| First published | 2016-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 33.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4086 |
| 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-buttons
- 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-buttons

## Dependencies (1)

- [clsx](https://npm.io/package/clsx.md) ^1.0.4

## 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-rc9 — 2017-11-07
- 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 more at https://npm.io/package/draft-js-buttons/versions

## README

# DraftJS Buttons

## Important: Include after the Editor

For the toolbar to work correctly, you must include the `<Toolbar>` component after the editor component:

```jsx
<Editor .../>
<Toolbar />
```


## Using the Subscript and Superscript buttons requires a custom style map:

```jsx
<Editor
    customStyleMap={{
      SUBSCRIPT: { fontSize: '0.6em', verticalAlign: 'sub' },
      SUPERSCRIPT: { fontSize: '0.6em', verticalAlign: 'super' }
    }}

/>
<Toolbar />
```

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