unlayer / react-email-editor

Drag-n-Drop Email Editor Component for React.js
https://unlayer.com/
MIT License
4.6k stars 742 forks source link

New implementation using autogerenated types #342

Closed brunolemos closed 1 year ago

brunolemos commented 1 year ago

Reuse the typescript types that were autogenerated by the editor source code.

You can try this PR by replacing the react-email-editor npm package with brunolemos-react-email-editor (latest).

Fix https://github.com/unlayer/react-email-editor/issues/335 Fix https://github.com/unlayer/react-email-editor/issues/334 Fix https://github.com/unlayer/react-email-editor/issues/338 Fix https://github.com/unlayer/react-email-editor/issues/354 Closes https://github.com/unlayer/react-email-editor/issues/340 Closes https://github.com/unlayer/react-email-editor/issues/325 Closes https://github.com/unlayer/react-email-editor/pull/254 Closes https://github.com/unlayer/react-email-editor/pull/286 Closes https://github.com/unlayer/react-email-editor/pull/195 Closes https://github.com/unlayer/react-email-editor/pull/180 Closes https://github.com/unlayer/react-email-editor/pull/201

image

Breaking change

We shouldn't export the methods one by one for the emailEditorRef.current.xxx() reference since they are all already available as emailEditorRef.current.editor.xxx().