Skip to content

Instantly share code, notes, and snippets.

@weianofsteel
Last active April 10, 2021 18:51
Show Gist options
  • Save weianofsteel/8ee6388153dbb5e52e066c9c4d1c3498 to your computer and use it in GitHub Desktop.
Save weianofsteel/8ee6388153dbb5e52e066c9c4d1c3498 to your computer and use it in GitHub Desktop.
text editor#1
import React, { Component } from 'react';
import { Editor } from 'react-draft-wysiwyg';
import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
export default class TextEditor extends Component{
constructor(props) {
super(props);
this.state = {
};
}
render() {
const wrapperStyle = {
border: '1px solid #969696',
}
const editorStyle = {
height:'10rem',
padding:'1rem'
}
return (
<React.Fragment>
<Editor
wrapperStyle={wrapperStyle}
editorStyle={editorStyle}
/>
</React.Fragment>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment