Skip to content

inshapardaz/urdu-editor

 
 

Repository files navigation

urdu-editor

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

Node.js Package

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-editor

Or with yarn:

yarn add @material-ui/icons draft-js urdu-editor

Usage

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 install and start it using yarn start

  • run the example project by using yarn install first to install packages and yarn start to start the example project in browser

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.8%
  • HTML 1.2%