Material-UI-RTE
Description
A rich text editor build with Draft.js and Material UI
Installation
yarn add material-ui-rte
Example
Filling this out later
API
Editor Props
Currently, all controls follow this property setup unless otherwise specified...
Specifying a boolean
will completely show / hide the controls altogether.
Specifying an array
will only show the buttons / menu items that were passed in.
Block styles (headings, paragraph, etc.)
blockStyleControls: PropTypes defaultProps = blockStyleControls: true
Divider
dividerControl: PropTypesbool defaultProps = dividerControl: true
The Divider Control does not accept an array value since it's only one button 😁
Inline Style Controls (bold, italic, underline)
inlineStyleControls: PropTypes defaultProps = inlineStyleControls: true
List Controls
listControls: PropTypes defaultProps = listControls: true
List Controls
alignmentControls: PropTypes defaultProps = alignmentControls: true
Development
yarn start
Make changes to src/app.js
for testing, webpack-dev-server
is run at localhost:4400
Run tests with yarn test
ToDo
- Move docs to Docz
- Setup live pages for storybook and docz
- Color picker
- Image controls
- Support for custom controls
- support for additional draft.js plugins
- support for plain text and html as initial values
PR's welcome!