npm.io
2.0.2 • Published 7 years ago

draft-js-buttons

Licence
MIT
Version
2.0.2
Deps
1
Size
34 kB
Vulns
0
Weekly
0
Stars
4.1K
DeprecatedThis package is deprecated

DraftJS Buttons

Important: Include after the Editor

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

<Editor .../>
<Toolbar />

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

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

/>
<Toolbar />

Keywords