alloyeditor-react-component

1.1.0 • Public • Published

alloyeditor-react-component

Component that integrates AlloyEditor with React js

Installation

npm install alloyeditor-react-component

Example

 
class Example extends Component {
    constructor(props) {
        super(props);
 
        this.state = {
            content: null,
        }
    }
 
  
    onChange(event){
      this.setState({
        content: event.editor.getData()
      })
    }
    
    render() {
        return (
            <AlloyEditor 
              content={this.state.content} 
              events={{
                "change": this.onChange
              }}
             className="my-editor"   
             />
        )
    }
}

/alloyeditor-react-component/

    Package Sidebar

    Install

    npm i alloyeditor-react-component

    Weekly Downloads

    10

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    137 kB

    Total Files

    4

    Last publish

    Collaborators

    • riamonte