Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-react

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-react - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

11

CHANGELOG.md
Changelog
=========
## [1.1.1](https://github.com/ckeditor/ckeditor5-react/compare/v1.1.0...v1.1.1) (2019-02-28)
### Bug fixes
* Fixed integration with collaboration features by changing the way how the initial data are passed to an editor instance. Previously the `<ckeditor>` component had been using the `editor.setData()` method which produces invalid results in collaboration. Now the initial data are injected directly into the container on which the editor will be created. Closes [#68](https://github.com/ckeditor/ckeditor5-react/issues/68). ([1c93b3e](https://github.com/ckeditor/ckeditor5-react/commit/1c93b3e))
### Other changes
* Added minimal versions of Node and npm. See: [ckeditor/ckeditor5#1507](https://github.com/ckeditor/ckeditor5/issues/1507). ([7b1777c](https://github.com/ckeditor/ckeditor5-react/commit/7b1777c))
## [1.1.0](https://github.com/ckeditor/ckeditor5-react/compare/v1.0.0...v1.1.0) (2018-11-29)

@@ -5,0 +16,0 @@

4

dist/ckeditor.js
/*!
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
!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=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(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)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=u(n(1)),i=u(n(2));function u(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.editor=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.default.Component),o(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(){var e=this;return r.default.createElement("div",{ref:function(t){return e.domContainer=t}})}},{key:"_initializeEditor",value:function(){var e=this;this.props.editor.create(this.domContainer,this.props.config).then(function(t){e.editor=t,e.props.data&&t.setData(e.props.data),"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}();t.default=a,a.propTypes={editor:i.default.func.isRequired,data:i.default.string,config:i.default.object,onChange:i.default.func,onInit:i.default.func,onFocus:i.default.func,onBlur:i.default.func,disabled:i.default.bool},a.defaultProps={config:{}}},function(t,n){t.exports=e},function(e,t,n){e.exports=n(3)()},function(e,t,n){"use strict";var o=n(4);function 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,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,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 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});
//# sourceMappingURL=ckeditor.js.map

@@ -5,3 +5,3 @@ Software License Agreement

**CKEditor 5 component for React** – https://github.com/ckeditor/ckeditor5-react <br>
Copyright (c) 2003-2018, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
Copyright (c) 2003-2019, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.

@@ -8,0 +8,0 @@ Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).

{
"name": "@ckeditor/ckeditor5-react",
"version": "1.1.0",
"version": "1.1.1",
"description": "Official React component for CKEditor 5 – the best browser-based rich text editor.",

@@ -25,2 +25,6 @@ "keywords": [

"main": "dist/ckeditor.js",
"engines": {
"node": ">=8.0.0",
"npm": ">=5.7.1"
},
"author": "CKSource (http://cksource.com/)",

@@ -27,0 +31,0 @@ "license": "GPL-2.0-or-later",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc