react-ckeditor-wrapper
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -46,3 +46,2 @@ 'use strict'; | ||
CKEditor.prototype.handleChange = function handleChange(value) { | ||
console.log(value); | ||
this.state.onChange(value); | ||
@@ -52,6 +51,2 @@ }; | ||
CKEditor.prototype.componentDidMount = function componentDidMount() { | ||
this.componentDidUpdate(); | ||
}; | ||
CKEditor.prototype.componentDidUpdate = function componentDidUpdate() { | ||
var _this2 = this; | ||
@@ -63,8 +58,17 @@ | ||
} | ||
var instance = window.CKEDITOR.appendTo(_reactDom2["default"].findDOMNode(this), this.state.config, this.state.value); | ||
instance.on('change', function () { | ||
_this2.handleChange(instance.getData()); | ||
this.instance = window.CKEDITOR.appendTo(_reactDom2["default"].findDOMNode(this), this.state.config, this.state.value); | ||
this.instance.on('change', function () { | ||
_this2.handleChange(_this2.instance.getData()); | ||
}); | ||
}; | ||
CKEditor.prototype.componentDidUpdate = function componentDidUpdate() { | ||
if (!this.instance) { | ||
return; | ||
} | ||
this.instance.setData(this.state.value); | ||
}; | ||
CKEditor.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) { | ||
@@ -71,0 +75,0 @@ this.state = { |
{ | ||
"name": "react-ckeditor-wrapper", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "CKEditor wrapper for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5678
68