@ckeditor/ckeditor5-react
Advanced tools
Comparing version 1.1.1 to 1.1.2
Changelog | ||
========= | ||
## [1.1.2](https://github.com/ckeditor/ckeditor5-react/compare/v1.1.1...v1.1.2) (2019-03-26) | ||
### Bug fixes | ||
* The `<CKEditor>` component will not be updated by the `React` itself. The editor won't freeze if the `#data` property was specified as a static string. Closes [#75](https://github.com/ckeditor/ckeditor5-react/issues/75). Closes [#78](https://github.com/ckeditor/ckeditor5-react/issues/78). ([bdb2ce3](https://github.com/ckeditor/ckeditor5-react/commit/bdb2ce3)) | ||
## [1.1.1](https://github.com/ckeditor/ckeditor5-react/compare/v1.1.0...v1.1.1) (2019-02-28) | ||
@@ -5,0 +12,0 @@ |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.CKEditor=t(require("react")):e.CKEditor=t(e.React)}(window,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){e.exports=n(3)()},function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return l});var o=n(1),r=n.n(o),i=n(0),u=n.n(i);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=s(this,p(t).call(this,e))).editor=null,n.domContainer=r.a.createRef(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,r.a.Component),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"componentDidUpdate",value:function(){this.editor&&("data"in this.props&&this.props.data!==this.editor.getData()&&this.editor.setData(this.props.data),"disabled"in this.props&&(this.editor.isReadOnly=this.props.disabled))}},{key:"componentDidMount",value:function(){this._initializeEditor()}},{key:"componentWillUnmount",value:function(){this._destroyEditor()}},{key:"render",value:function(){return r.a.createElement("div",{ref:this.domContainer,dangerouslySetInnerHTML:{__html:this.props.data||""}})}},{key:"_initializeEditor",value:function(){var e=this;this.props.editor.create(this.domContainer.current,this.props.config).then(function(t){e.editor=t,"disabled"in e.props&&(t.isReadOnly=e.props.disabled),e.props.onInit&&e.props.onInit(t);var n=t.model.document,o=t.editing.view.document;n.on("change:data",function(n){e.props.onChange&&e.props.onChange(n,t)}),o.on("focus",function(n){e.props.onFocus&&e.props.onFocus(n,t)}),o.on("blur",function(n){e.props.onBlur&&e.props.onBlur(n,t)})}).catch(function(e){console.error(e)})}},{key:"_destroyEditor",value:function(){var e=this;this.editor&&this.editor.destroy().then(function(){e.editor=null})}}]),t}();l.propTypes={editor:u.a.func.isRequired,data:u.a.string,config:u.a.object,onChange:u.a.func,onInit:u.a.func,onFocus:u.a.func,onBlur:u.a.func,disabled:u.a.bool},l.defaultProps={config:{}}},function(e,t,n){"use strict";var o=n(4);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,u){if(u!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}]).default}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.CKEditor=t(require("react")):e.CKEditor=t(e.React)}(window,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){e.exports=n(3)()},function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return l});var o=n(1),r=n.n(o),i=n(0),u=n.n(i);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=f(this,s(t).call(this,e))).editor=null,n.domContainer=r.a.createRef(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,r.a.Component),function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(t,[{key:"shouldComponentUpdate",value:function(e){return this._shouldUpdateContent(e)&&this.editor.setData(e.data),"disabled"in e&&(this.editor.isReadOnly=e.disabled),!1}},{key:"componentDidMount",value:function(){this._initializeEditor()}},{key:"componentWillUnmount",value:function(){this._destroyEditor()}},{key:"render",value:function(){return r.a.createElement("div",{ref:this.domContainer,dangerouslySetInnerHTML:{__html:this.props.data||""}})}},{key:"_initializeEditor",value:function(){var e=this;this.props.editor.create(this.domContainer.current,this.props.config).then(function(t){e.editor=t,"disabled"in e.props&&(t.isReadOnly=e.props.disabled),e.props.onInit&&e.props.onInit(t);var n=t.model.document,o=t.editing.view.document;n.on("change:data",function(n){e.props.onChange&&e.props.onChange(n,t)}),o.on("focus",function(n){e.props.onFocus&&e.props.onFocus(n,t)}),o.on("blur",function(n){e.props.onBlur&&e.props.onBlur(n,t)})}).catch(function(e){console.error(e)})}},{key:"_destroyEditor",value:function(){var e=this;this.editor&&this.editor.destroy().then(function(){e.editor=null})}},{key:"_shouldUpdateContent",value:function(e){return this.props.data!==e.data&&this.editor.getData()!==e.data}}]),t}();l.propTypes={editor:u.a.func.isRequired,data:u.a.string,config:u.a.object,onChange:u.a.func,onInit:u.a.func,onFocus:u.a.func,onBlur:u.a.func,disabled:u.a.bool},l.defaultProps={config:{}}},function(e,t,n){"use strict";var o=n(4);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,u){if(u!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}]).default}); | ||
//# sourceMappingURL=ckeditor.js.map |
{ | ||
"name": "@ckeditor/ckeditor5-react", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Official React component for CKEditor 5 – the best browser-based rich text editor.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -28,2 +28,5 @@ # CKEditor 5 rich text editor component for React | ||
Before starting tests execution, you need to build the package. You can use `npm run build` in order to build the production-ready version | ||
or `npm run develop` which produces a development version with attached watcher for all sources files. | ||
```bash | ||
@@ -50,4 +53,2 @@ npm run test -- [additional options] | ||
If you are going to change the source (`src/ckeditor.jsx`) file, remember about rebuilding the package. You can use `npm run develop` in order to do it automatically. | ||
### Building the package | ||
@@ -54,0 +55,0 @@ |
Sorry, the diff of this file is not supported yet
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
28518
79