1.0.1 • Published 4 years ago
urdu-editor v1.0.1
urdu-editor
React component that allows to use a rich editor based on Material UI and Draft-js
Extension to work by Kelsier90
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 urdu-editorOr with yarn:
yarn add @material-ui/icons draft-js urdu-editorUsage
import React from 'react'
import MUIEditor, { MUIEditorState } from 'urdu-editor'
function Example() {
const [editorState, setEditorState] = React.useState(MUIEditorState.createEmpty());
const onChange = (newState) => {
setEditorState(newState);
};
<MUIEditor editorState={editorState} onChange={onChange} />
}Local Developing
install packages using
yarn installand start it usingyarn startrun the example project by using
yarn installfirst to install packages andyarn startto start the example project in browser
Full documentation here:
https://kelsier90.github.io/react-mui-draft-wysiwyg/
License
MIT © Kelsier90