Last active
April 10, 2021 18:51
-
-
Save weianofsteel/8ee6388153dbb5e52e066c9c4d1c3498 to your computer and use it in GitHub Desktop.
text editor#1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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