{"_id":"@camjw/react-email-editor","_rev":"2-871a6b698731e91a02d9b860c819caf7","name":"@camjw/react-email-editor","dist-tags":{"latest":"1.5.2"},"versions":{"1.5.1":{"name":"@camjw/react-email-editor","version":"1.5.1","description":"Unlayer's Email Editor Component for React.js - @camjw fork to add React 17 support","main":"lib/index.js","module":"es/index.js","scripts":{"build":"nwb build-react-component","clean":"nwb clean-module && nwb clean-demo","start":"nwb serve-react-demo","test":"nwb test-react","test:coverage":"nwb test-react --coverage","test:watch":"nwb test-react --server","release":"npm run build && npm publish"},"dependencies":{},"peerDependencies":{"react":"15.x || 16.x || 17.x"},"devDependencies":{"nwb":"^0.22.0","react":"^16.13.1","react-dom":"^16.13.1","react-router-dom":"^5.2.0","styled-components":"^4.2.0"},"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/camjw/react-email-editor.git"},"keywords":["react-component"],"gitHead":"65bf2bea0141340aeacca98b9b9abd64bf14318f","bugs":{"url":"https://github.com/camjw/react-email-editor/issues"},"homepage":"https://github.com/camjw/react-email-editor#readme","_id":"@camjw/react-email-editor@1.5.1","_nodeVersion":"16.10.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-00HANx4pPnHjsoRzOGY1450vYO42KP4pkBzOJc8umZ7uXhRHNuT66yq1zDY657xCjmWtT5lf7GDAEbT9YtRL1Q==","shasum":"75964922b37afeea207e08c0ef305cdb1f7be930","tarball":"https://registry.npmjs.org/@camjw/react-email-editor/-/react-email-editor-1.5.1.tgz","fileCount":3,"unpackedSize":6630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpAJ2CRA9TVsSAnZWagAAP84P/i69X4/AnX9p8QOHVei/\n+BXPUxhPb+jY3wcSa9p+lg62GKoht5bRckVWCKiiqqaYJY2rbG+AStNtmytm\nkQsPdlh1ZY794YnT4cCSrdmScdEmBx2zyNe4FF9NujG11/aiMVPlsh6Anfgd\nuYsGUzifIKPuZ4vDS9tR2QSP3aX923cJ4O0Yr9duXV3eJYnTlYv9ZrvjKcFz\n4una+ZTBl4vP8XRR/IoT9D/3nzWQcQYX4Vj/c3JOENtRsnQjs0cVl5Hr22zH\nOWyyinBW9rrriK0sF9Gz5tTf0AqbUotjum/G02cqBuHdFtRRYM8E5PJPF5rG\npPPYSlybN/kqMH9wSj6DJQ10hJyIWEHePONDjCN7KSn2kyPqOjyi/r+ozZp/\ngLuOMyTcpKKu1fIMNx82mj7I0Gs+9XLbS5t59Ok784xWQzGswxepP+232u3k\n7N448X5gZwzXp6U06XXV1CU2DrRT6uirYmG50ktJpHVbI0rHgWxjAVfaLo1S\nooWbq7Rzr4GE+RMURtlGKqBSxlgtaVuTpFLhiFESPdwvH1twFoqBlbXqReGi\nMYTiihaw4++Qd2YNg5EjR1TFDQ/Jr2KX6p3WmJBnBoRZOYyAsr8RGyxy4qwB\nOLMsJvZUR2vKmrH5JdrHksYDidU70DK7QDCFkDWgndxnWMrJxSAwFZ7or+Ga\nz6qd\r\n=/YVE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsvDRiSDUJrcjmXUjlpCIo2ItVxxGx1LjR/y9295NwiwIhAMIJVE/b5FxZCZAYHOh2eVpP+m7eQ8hrjufEX3hlC8yX"}]},"_npmUser":{"name":"camjw","email":"camjw119@gmail.com"},"directories":{},"maintainers":[{"name":"camjw","email":"camjw119@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-email-editor_1.5.1_1638138486057_0.47841917420573243"},"_hasShrinkwrap":false},"1.5.2":{"name":"@camjw/react-email-editor","version":"1.5.2","description":"Unlayer's Email Editor Component for React.js - @camjw fork to add React 17 support","main":"lib/index.js","module":"es/index.js","scripts":{"build":"nwb build-react-component","clean":"nwb clean-module && nwb clean-demo","start":"nwb serve-react-demo","test":"nwb test-react","test:coverage":"nwb test-react --coverage","test:watch":"nwb test-react --server","release":"npm run build && npm publish"},"dependencies":{},"peerDependencies":{"react":"15.x || 16.x || 17.x"},"devDependencies":{"nwb":"^0.25.0","react":"^16.13.1","react-dom":"^16.13.1","react-router-dom":"^5.2.0","styled-components":"^4.2.0"},"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/camjw/react-email-editor.git"},"keywords":["react-component"],"gitHead":"e515313e45143758bead1f260fafcf1ea42ddaf9","bugs":{"url":"https://github.com/camjw/react-email-editor/issues"},"homepage":"https://github.com/camjw/react-email-editor#readme","_id":"@camjw/react-email-editor@1.5.2","_nodeVersion":"16.10.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-bfHKhcBlpQzfRXQCJsUYqMvdfTjmSLWlKjBl6GvLIp3x1jvw+69/mIXnhAG2gXMpw6ZTNbZ/kudLszE6oeqx7Q==","shasum":"c5cdf8050d916b445499e43028ead8e611cafae3","tarball":"https://registry.npmjs.org/@camjw/react-email-editor/-/react-email-editor-1.5.2.tgz","fileCount":10,"unpackedSize":48331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpAN8CRA9TVsSAnZWagAAiAkP/izvvqKlAxY+D8msdKJ+\nNIv1lSdEfL6g+E/VPDcBJiqXXQTQDy4AhKyCcsEPsBowaLn+h/Fncg4mdauv\nqzGTTmHU2dmmbICPfiF6qNCRwbldWyxDP+IVNhIUY5EnHS0rxjHbSsZl9MR0\nJVW6moMukClgUIIDPOCqrJ7yxErMtpBaHMus4ks6Q6sw24TzcNnEgtlI/RXH\nEq1mQt9VwxbkIHjuSJz7gmlWuPVgblvArwh29cNzerA4l7G4tDij9YcF7ubk\ng9g8Sg+v3d2aSZv5VdVTM3zxjPzIuHQ0efzGZJ402q3wGIM8kkZ5kMXX4qgV\nTHd7vhnlVWP8sRPLhWCJVOVvFEoValxpllIrUm3eJXfG+u2+Fhx4K/sWDfwj\nKcKHfc9z6GDRaNTkyCgHlpCaVuJGOQoJ3pnUhZC08Lsn91/vEJ+Vs2miPtnl\nVzhqjKre/ykZxlX8ht5CAJyI88XKhiU45z+zO7dWR4QJnSEKS1ODguPxk99z\ngif1Xhch1Ty4yQNRJCiTqXGhTbXmrqx2294eghoFLdmIQpNfV0QCiJGePCSh\nmYr8nLCV0t5PXwcmeOQAPUCjVYTrsC4VsT/+IQJMRpIdpL9ErnYt/qG/B3hm\nO+ftF+LlqRPsCjqxMsZsN+mD4VG7kyheQUkgyMTqIaK/b/1ToWz2MeSbhgbi\nA17M\r\n=Ul8I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2oLiIA601+vHQm3ycRjSQ3l+GowXTAf6Gq0GXGqkrRgIhAPJcNwwT3Qdz+a3mjZIpdWG/pSAVpuJzg//EtUe04Vnr"}]},"_npmUser":{"name":"camjw","email":"camjw119@gmail.com"},"directories":{},"maintainers":[{"name":"camjw","email":"camjw119@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-email-editor_1.5.2_1638138748214_0.5076393650219506"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-28T22:28:06.012Z","1.5.1":"2021-11-28T22:28:06.213Z","modified":"2022-04-04T21:34:25.247Z","1.5.2":"2021-11-28T22:32:28.422Z"},"maintainers":[{"name":"camjw","email":"camjw119@gmail.com"}],"description":"Unlayer's Email Editor Component for React.js - @camjw fork to add React 17 support","homepage":"https://github.com/camjw/react-email-editor#readme","keywords":["react-component"],"repository":{"type":"git","url":"git+https://github.com/camjw/react-email-editor.git"},"bugs":{"url":"https://github.com/camjw/react-email-editor/issues"},"license":"MIT","readme":"# React Email Editor\r\n\r\nNOTE: this is just a fork by @camjw to add React 17 support\r\n\r\nThe excellent drag-n-drop email editor by [Unlayer](https://unlayer.com/embed) as a [React.js](http://facebook.github.io/react) _wrapper component_. This is the most powerful and developer friendly visual email builder for your app.\r\n\r\n|                                                          Video Overview                                                           |\r\n| :-------------------------------------------------------------------------------------------------------------------------------: |\r\n| [![React Email Editor](https://unroll-assets.s3.amazonaws.com/unlayervideotour.png)](https://www.youtube.com/watch?v=MIWhX-NF3j8) |\r\n|                                       _Watch video overview: https://youtu.be/MIWhX-NF3j8_                                        |\r\n\r\n## Live Demo\r\n\r\nCheck out the live demo here: http://react-email-editor-demo.netlify.com/ ([Source Code](https://github.com/unlayer/react-email-editor/blob/master/demo/src/index.js))\r\n\r\n## Blog Post\r\n\r\nHere's a blog post with a quickstart guide: https://medium.com/unlayer-blog/creating-a-drag-n-drop-email-editor-with-react-db1e9eb42386\r\n\r\n## Installation\r\n\r\nThe easiest way to use React Email Editor is to install it from NPM and include it in your own React build process.\r\n\r\n```\r\nnpm install react-email-editor --save\r\n```\r\n\r\n## Usage\r\n\r\nRequire the EmailEditor component and render it with JSX:\r\n\r\n```javascript\r\nimport React, { useRef } from 'react';\r\nimport { render } from 'react-dom';\r\n\r\nimport EmailEditor from 'react-email-editor';\r\n\r\nconst App = (props) => {\r\n  const emailEditorRef = useRef(null);\r\n\r\n  const exportHtml = () => {\r\n    emailEditorRef.current.editor.exportHtml((data) => {\r\n      const { design, html } = data;\r\n      console.log('exportHtml', html);\r\n    });\r\n  };\r\n\r\n  const onLoad = () => {\r\n    // editor instance is created\r\n    // you can load your template here;\r\n    // const templateJson = {};\r\n    // emailEditorRef.current.editor.loadDesign(templateJson);\r\n  };\r\n\r\n  const onReady = () => {\r\n    // editor is ready\r\n    console.log('onReady');\r\n  };\r\n\r\n  return (\r\n    <div>\r\n      <div>\r\n        <button onClick={exportHtml}>Export HTML</button>\r\n      </div>\r\n\r\n      <EmailEditor ref={emailEditorRef} onLoad={onLoad} onReady={onReady} />\r\n    </div>\r\n  );\r\n};\r\n\r\nrender(<App />, document.getElementById('app'));\r\n```\r\n\r\n### Methods\r\n\r\n| method         | params              | description                                             |\r\n| -------------- | ------------------- | ------------------------------------------------------- |\r\n| **loadDesign** | `Object data`       | Takes the design JSON and loads it in the editor        |\r\n| **saveDesign** | `Function callback` | Returns the design JSON in a callback function          |\r\n| **exportHtml** | `Function callback` | Returns the design HTML and JSON in a callback function |\r\n\r\nSee the [example source](https://github.com/unlayer/react-email-editor/blob/master/demo/src/index.js) for a reference implementation.\r\n\r\n### Properties\r\n\r\n- `editorId` `String` HTML div id of the container where the editor will be embedded (optional)\r\n- `style` `Object` style object for the editor container (default {})\r\n- `minHeight` `String` minimum height to initialize the editor with (default 500px)\r\n- `onLoad` `Function` called when the editor instance is created\r\n- `onReady` `Function` called when the editor has finished loading\r\n- `options` `Object` options passed to the Unlayer editor instance (default {})\r\n- `tools` `Object` configuration for the built-in and custom tools (default {})\r\n- `appearance` `Object` configuration for appearance and theme (default {})\r\n- `projectId` `Integer` Unlayer project ID (optional)\r\n\r\nSee the [Unlayer Docs](https://docs.unlayer.com/) for all available options.\r\n\r\n## Custom Tools\r\n\r\nCustom tools can help you add your own content blocks to the editor. Every application is different and needs different tools to reach it's full potential. [Learn More](https://docs.unlayer.com/docs/custom-tools)\r\n\r\n[![Custom Tools](https://unroll-assets.s3.amazonaws.com/custom_tools.png)](https://docs.unlayer.com/docs/custom-tools)\r\n\r\n## Localization\r\n\r\nYou can submit new language translations by creating a PR on this GitHub repo: https://github.com/unlayer/translations. Translations managed by [PhraseApp](https://phraseapp.com)\r\n\r\n### License\r\n\r\nCopyright (c) 2021 Unlayer. [MIT](LICENSE) Licensed.\r\n","readmeFilename":"README.md"}