JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14952
  • Score
    100M100P100Q13631F
  • License MIT

Buttons for DraftJS

Package Exports

  • draft-js-buttons

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (draft-js-buttons) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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