diff --git a/lib/components/TinyMCE.js b/lib/components/TinyMCE.js index eb778e9..3d1b7d4 100644 --- a/lib/components/TinyMCE.js +++ b/lib/components/TinyMCE.js @@ -52,7 +52,8 @@ const TinyMCE = React.createClass({ componentDidMount() { const config = clone(this.props.config); - this._init(config); + const content = clone(this.props.content); + this._init(config,content); }, componentWillReceiveProps(nextProps) { @@ -114,7 +115,7 @@ const TinyMCE = React.createClass({ }); // need to set content here because the textarea will still have the // old `this.props.content` - if (content) { + if (typeof content !=="undefined") { editor.on('init', () => { editor.setContent(content); });