JSPM

react-mui-draft-wysiwyg

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

React component that allows to use a rich editor based on Material UI and Draft-js

Package Exports

  • react-mui-draft-wysiwyg

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 (react-mui-draft-wysiwyg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-mui-draft-wysiwyg

React component that allows to use a rich editor based on Material UI and Draft-js

NPM JavaScript Style Guide

Install

if you don't have Material UI installed yet:

https://material-ui.com/getting-started/installation/

Then install the editor:

With npm:

npm install --save @material-ui/icons draft-js react-mui-draft-wysiwyg

Or with yarn:

yarn add @material-ui/icons draft-js react-mui-draft-wysiwyg

Usage

import React from 'react'
import MUIEditor, { MUIEditorState } from 'react-mui-draft-wysiwyg'

function Example() {
  const [editorState, setEditorState] = React.useState(MUIEditorState.createEmpty());

  const onChange = (newState) => {
    setEditorState(newState);
  };

  <MUIEditor editorState={editorState} onChange={onChange} />
}

Full documentation here:

https://kelsier90.github.io/react-mui-draft-wysiwyg/

License

MIT © Kelsier90