Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 15 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
v0.5.2 - Wed, 23 Nov 2016 07:11:28 GMT
--------------------------------------

- added support for content update via redux form


v0.5.1 - Thu, 21 Apr 2016 00:17:15 GMT
--------------------------------------

-
-


v0.5.0 - Thu, 21 Apr 2016 00:16:59 GMT
--------------------------------------

-
-


v0.5.0 - Wed, 20 Apr 2016 22:54:27 GMT
--------------------------------------

-
-


v0.4.0 - Thu, 05 Nov 2015 22:24:52 GMT
--------------------------------------

-
-


v0.3.1 - Fri, 23 Oct 2015 22:48:23 GMT
Expand All @@ -38,25 +44,25 @@ v0.3.0 - Thu, 22 Oct 2015 08:40:36 GMT
v0.2.3 - Fri, 24 Jul 2015 00:47:50 GMT
--------------------------------------

-
-


v0.2.2 - Tue, 30 Jun 2015 17:28:40 GMT
--------------------------------------

-
-


v0.2.1 - Thu, 18 Jun 2015 19:14:33 GMT
--------------------------------------

-
-


v0.2.0 - Tue, 16 Jun 2015 22:54:31 GMT
--------------------------------------

-
-


v0.1.1 - Fri, 12 Jun 2015 21:14:13 GMT
Expand All @@ -68,6 +74,6 @@ v0.1.1 - Fri, 12 Jun 2015 21:14:13 GMT
v0.1.0 - Thu, 30 Apr 2015 22:26:00 GMT
--------------------------------------

-
-


17 changes: 13 additions & 4 deletions dist/react-tinymce.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/react-tinymce.min.js

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions lib/components/TinyMCE.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,25 @@ const TinyMCE = React.createClass({
},

componentWillReceiveProps(nextProps) {
if (!isEqual(this.props.config, nextProps.config)) {
this._init(nextProps.config, nextProps.content);
}
if (!isEqual(this.props.id, nextProps.id)) {
this.id = nextProps.id;
}
if (!isEqual(this.props.config, nextProps.config) || !isEqual(this.props.id, nextProps.id)) {
this._init(clone(nextProps.config), nextProps.content);
return;
}

const editor = tinymce.EditorManager.get(this.id);
if (!isEqual(editor.getContent({format: 'html'}), nextProps.content)) {
editor.setContent(nextProps.content);

editor.selection.select(editor.getBody(), true);
editor.selection.collapse(false);
}
},

shouldComponentUpdate(nextProps) {
return (
!isEqual(this.props.content, nextProps.content) ||
!isEqual(this.props.config, nextProps.config)
);
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-tinymce",
"version": "0.5.1",
"version": "0.5.2",
"description": "React TinyMCE component",
"main": "lib/main.js",
"scripts": {
Expand Down