react-text-edit
v0.2.3
Published
A text editor components written with ReactJs.
Downloads
19
Readme
React-Text-Edit
A text editor components written with React.
Installation
NPM
$ npm install react-text-edit --save
Usage
import React, {Component} from 'react';
import ReactTextEdit from 'react-text-edit';
export default class MyComponent extends Component {
constructor(props) {
super(props);
this.state = {
data: ''
};
this.onChange = this::this.onChange;
}
onChange(data) {
this.setState({
data
});
}
// ...
render() {
return (
<ReactTextEdit data={this.state.data}
onChange={this.onChange}/>
);
}
}
Examples
Examples can be found in the examples folder.
Run Demo
$ npm run demo
License
This project is licensed under the terms of the MIT license