react-mui-draft-wysiwyg
React component that allows to use a rich editor based on Material UI and Draft-js
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
Imports
import MUIEditor, { MUIEditorState } from "react-mui-draft-wysiwyg";
Basic usage
Normal
default
default
MUIEditor Properties
editorState
object
required
onChange
func
required
onFocus
func
null
onBlur
func
null
config
object
defaultConfig