Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tried to fix the rerender issue on props change
  • Loading branch information
vishalsingal committed Sep 11, 2017
commit 8cb7f87e225d2599c065d9c5d8329032bafd4f6a
6 changes: 6 additions & 0 deletions lib/components/TinyMCE.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ const TinyMCE = React.createClass({
// editor.selection.select(editor.getBody(), true);
// editor.selection.collapse(false);
// }

// TODO: This works better for me, not sure if it's the correct solution
const editor = tinymce.EditorManager.get(this.id);
if (editor && !isEqual(editor.getContent(), nextProps.content)) {
editor.setContent(nextProps.content);
}
},

shouldComponentUpdate(nextProps) {
Expand Down