Guest User

Untitled

a guest
Jul 22nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import TinyMCE from 'react-tinymce';
  3.  
  4. class Textarea extends Component {
  5.  
  6. constructor(props) {
  7. //...
  8. }
  9.  
  10. render() {
  11.  
  12. return (
  13.  
  14. <TinyMCE
  15. name={this.props.name}
  16. content={this.props.value}
  17. onChange={this.handleFieldChange}
  18. config={{
  19. plugins: 'autolink link image lists print preview code',
  20. toolbar: 'undo redo | bold italic | alignleft aligncenter alignright | code'
  21. }}
  22. />
  23. )
  24. }
  25. }
  26.  
  27. <Textarea value={data.body} />
Add Comment
Please, Sign In to add comment