1.1.0 • Published 4 years ago

alloyeditor-react-component v1.1.0

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

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"   
             />
        )
    }
}
1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago