Skip to content

Kelsier90/react-mui-draft-wysiwyg

Repository files navigation

react-mui-draft-wysiwyg

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

NPM JavaScript Style Guide

Hi, I'm a rich text editor based on MUI 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

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published