site.jsx 497 B

123456789101112131415161718192021222324
  1. import React from 'react';
  2. import theme from 'react-quill/dist/quill.snow.css'
  3. import ReactQuill from 'react-quill'
  4. class Site extends React.Component {
  5. constructor(props) {
  6. super(props)
  7. this.state = { text: '' }
  8. this.handleChange = this.handleChange.bind(this)
  9. }
  10. handleChange(value) {
  11. this.setState({ text: value })
  12. }
  13. render() {
  14. return (
  15. <ReactQuill value={this.state.text}
  16. onChange={this.handleChange} />
  17. )
  18. }
  19. }
  20. export default Site;