instructure-react / react-tinymce

React TinyMCE component
181 stars 110 forks source link

checksum mismatch serverside rendering #18

Closed jamesjjk closed 8 years ago

jamesjjk commented 8 years ago

Hey there, the wrapper seems to work well. However for serverside rendering it looks like you are keeping a count:

var count = 0; module.exports = function uuid() { return 'react-tinymce-' + count++; };

Maybe this can be slightly refactored for those working in an isomorphic setup? The above causes a mismatch for isomorphic apps: figure out why the markup being generated is different on the client or server: (client) a id="react-tinymce-0" data-reactid=".12 (server) a id="react-tinymce-3" data-reactid=".12

jamesjjk commented 8 years ago

I found the ID property!!.. Just an FYI I would consider changing line 89 defaultValue={this.props.content} to putting the value in the textArea.. as the attribute defaultValue does not update on an update of the content prop.

alex-paterson commented 7 years ago

For anybody else with this issue, manually set an id prop when you render the TinyMCE component.