react-ckeditor-component
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -48,3 +48,2 @@ "use strict"; | ||
isScriptLoaded: _this.props.isScriptLoaded, | ||
content: _this.props.content, | ||
config: _this.props.config | ||
@@ -63,2 +62,4 @@ }; | ||
loadScript(this.props.scriptUrl, this.onLoad); | ||
} else { | ||
this.onLoad(); | ||
} | ||
@@ -80,12 +81,10 @@ } | ||
this.editorInstance = window.CKEDITOR.appendTo(_reactDom2.default.findDOMNode(this), this.state.config, this.state.content); | ||
this.editorInstance = window.CKEDITOR.appendTo(_reactDom2.default.findDOMNode(this), this.state.config, this.props.content); | ||
this.editorInstance.on("change", function () { | ||
_this2.setState({ | ||
content: _this2.editorInstance.getData() | ||
}); | ||
var content = _this2.editorInstance.getData(); | ||
//call callback if present | ||
if (_this2.props.onChange) { | ||
_this2.props.onChange(_this2.state.content); | ||
_this2.props.onChange(content); | ||
} | ||
@@ -92,0 +91,0 @@ }); |
{ | ||
"name": "react-ckeditor-component", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "CKEditor component 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
9341
89