Reputation: 1066
I'm rendering my submit form via ReactJS using tinymce-rails gem for Rails app. Followed this tutorial to install tinymce: https://github.com/spohlenz/tinymce-rails
Render code:
render: function() {
<textarea
ref="body"
value={this.state.data.body}
onChange={this.handleBodyChange}
className="tinymce form-control"
placeholder="Body"
rows="10"
cols="5"
required
/>
}
The problem is that it renders only on page refresh, without it we have regular textarea. Turbolinks are disabled.
Tried to add tinymce.init({selector:'textarea'})
to the componentDidMount:
, but it's not working.
Upvotes: 1
Views: 1300
Reputation: 1066
As I figured it out I cant do this, I have to add React mixin TinyMCE.
Upvotes: 0