Socket
Socket
Sign inDemoInstall

@natterstefan/react-editor-js

Package Overview
Dependencies
7
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

7

CHANGELOG.md

@@ -6,2 +6,9 @@ # react-editor-js

### [0.3.1](https://github.com/natterstefan/react-editor-js/compare/v0.3.0...v0.3.1) (2019-12-17)
### Fixes
* still support deprecated holderId property ([10774a4](https://github.com/natterstefan/react-editor-js/commit/10774a41b002acf9398036ceee387299c2b0304d))
## [0.3.0](https://github.com/natterstefan/react-editor-js/compare/v0.2.3...v0.3.0) (2019-12-17)

@@ -8,0 +15,0 @@

2

dist/reacteditorjs.js

@@ -1,2 +0,2 @@

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@editorjs/editorjs"),require("@editorjs/paragraph"),require("@editorjs/header")):"function"==typeof define&&define.amd?define(["react","@editorjs/editorjs","@editorjs/paragraph","@editorjs/header"],r):"object"==typeof exports?exports.ReactEditorJs=r(require("react"),require("@editorjs/editorjs"),require("@editorjs/paragraph"),require("@editorjs/header")):e.ReactEditorJs=r(e.react,e["@editorjs/editorjs"],e["@editorjs/paragraph"],e["@editorjs/header"])}(window,(function(e,r,t,n){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(1);r.default=n.default},function(e,r,t){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(2)),c=u(t(3)),s=u(t(4)),f=u(t(5));r.default=a.memo((function(e){var r=e.holder,t=e.editorInstance,i=e.reinitializeOnPropsChange,u=e.children,l=e.tools,d=o(e,["holder","editorInstance","reinitializeOnPropsChange","children","tools"]),p=a.useRef(null),j=r||"editorjs",h=a.useCallback((function(){p&&!p.current&&(p.current=new c.default(n({tools:n({paragraph:{class:s.default,inlineToolbar:!0},header:f.default},l),holder:j},d))),t&&t(p.current)}),[t,j,d,l]);return a.useEffect((function(){return h(),function(){p.current&&i&&p.current.isReady.then((function(){p.current.destroy(),p.current=void 0,h()}))}}),[h,i]),u||a.default.createElement("div",{id:j})}))},function(r,t){r.exports=e},function(e,t){e.exports=r},function(e,r){e.exports=t},function(e,r){e.exports=n}])}));
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@editorjs/editorjs"),require("@editorjs/paragraph"),require("@editorjs/header")):"function"==typeof define&&define.amd?define(["react","@editorjs/editorjs","@editorjs/paragraph","@editorjs/header"],r):"object"==typeof exports?exports.ReactEditorJs=r(require("react"),require("@editorjs/editorjs"),require("@editorjs/paragraph"),require("@editorjs/header")):e.ReactEditorJs=r(e.react,e["@editorjs/editorjs"],e["@editorjs/paragraph"],e["@editorjs/header"])}(window,(function(e,r,t,n){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(1);r.default=n.default},function(e,r,t){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(2)),c=u(t(3)),d=u(t(4)),l=u(t(5));r.default=a.memo((function(e){var r=e.holderId,t=e.holder,i=e.editorInstance,u=e.reinitializeOnPropsChange,s=e.children,f=e.tools,p=o(e,["holderId","holder","editorInstance","reinitializeOnPropsChange","children","tools"]),j=a.useRef(null),h=r||t||"editorjs",y=a.useCallback((function(){j&&!j.current&&(j.current=new c.default(n({tools:n({paragraph:{class:d.default,inlineToolbar:!0},header:l.default},f),holder:h},p))),i&&i(j.current)}),[i,h,p,f]);return a.useEffect((function(){return y(),function(){j.current&&u&&j.current.isReady.then((function(){j.current.destroy(),j.current=void 0,y()}))}}),[y,u]),s||a.default.createElement("div",{id:h})}))},function(r,t){r.exports=e},function(e,t){e.exports=r},function(e,r){e.exports=t},function(e,r){e.exports=n}])}));
//# sourceMappingURL=reacteditorjs.js.map

@@ -18,5 +18,5 @@ var __rest = (this && this.__rest) || function (s, e) {

const EditorJs = (props) => {
const { holder: customHolderId, editorInstance, reinitializeOnPropsChange, children, tools } = props, otherProps = __rest(props, ["holder", "editorInstance", "reinitializeOnPropsChange", "children", "tools"]);
const { holderId: deprecatedId, holder: customHolderId, editorInstance, reinitializeOnPropsChange, children, tools } = props, otherProps = __rest(props, ["holderId", "holder", "editorInstance", "reinitializeOnPropsChange", "children", "tools"]);
const instance = useRef(null);
const holderId = customHolderId || DEFAULT_ID;
const holderId = deprecatedId || customHolderId || DEFAULT_ID;
const initEditor = useCallback(() => {

@@ -23,0 +23,0 @@ if (instance && !instance.current) {

@@ -29,5 +29,5 @@ var __assign = (this && this.__assign) || function () {

var EditorJs = function (props) {
var customHolderId = props.holder, editorInstance = props.editorInstance, reinitializeOnPropsChange = props.reinitializeOnPropsChange, children = props.children, tools = props.tools, otherProps = __rest(props, ["holder", "editorInstance", "reinitializeOnPropsChange", "children", "tools"]);
var deprecatedId = props.holderId, customHolderId = props.holder, editorInstance = props.editorInstance, reinitializeOnPropsChange = props.reinitializeOnPropsChange, children = props.children, tools = props.tools, otherProps = __rest(props, ["holderId", "holder", "editorInstance", "reinitializeOnPropsChange", "children", "tools"]);
var instance = useRef(null);
var holderId = customHolderId || DEFAULT_ID;
var holderId = deprecatedId || customHolderId || DEFAULT_ID;
var initEditor = useCallback(function () {

@@ -34,0 +34,0 @@ if (instance && !instance.current) {

@@ -41,5 +41,5 @@ "use strict";

var EditorJs = function (props) {
var customHolderId = props.holder, editorInstance = props.editorInstance, reinitializeOnPropsChange = props.reinitializeOnPropsChange, children = props.children, tools = props.tools, otherProps = __rest(props, ["holder", "editorInstance", "reinitializeOnPropsChange", "children", "tools"]);
var deprecatedId = props.holderId, customHolderId = props.holder, editorInstance = props.editorInstance, reinitializeOnPropsChange = props.reinitializeOnPropsChange, children = props.children, tools = props.tools, otherProps = __rest(props, ["holderId", "holder", "editorInstance", "reinitializeOnPropsChange", "children", "tools"]);
var instance = react_1.useRef(null);
var holderId = customHolderId || DEFAULT_ID;
var holderId = deprecatedId || customHolderId || DEFAULT_ID;
var initEditor = react_1.useCallback(function () {

@@ -46,0 +46,0 @@ if (instance && !instance.current) {

{
"name": "@natterstefan/react-editor-js",
"version": "0.3.0",
"version": "0.3.1",
"description": "Unofficial react component for editorjs (https://editorjs.io/)",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc