Open noirwave opened 8 years ago
Work-around using componentDidMount
and document.getElementById
class RichTextEditor extends React.Component {
static propTypes = {
id: React.PropTypes.string.isRequired,
}
componentDidMount() {
this.textAreaElement = document.getElementById(this.props.id)
this.textAreaElement.name = this.props.id
}
render() {
return <TinyMCE
id={this.props.id}
config={{
forced_root_block: 'div',
height: '500px',
skin: 'lightgray',
plugins: 'advlist autolink lists link image wordcount save contextmenu directionality textcolor colorpicker',
menu: {},
toolbar: 'bold italic underline | forecolor | bullist numlist outdent indent | fontselect',
statusbar: false,
}}
/>
}
}
export default RichTextEditor
Hi. How can I set "name" property to textarea component with <TinyMCE/> component? I can set "content", "config" and what about the "name"? Thanks.