0

I have a react application that uses the unlayer email editor. I also have some custom tools which I include in the editor like this:

import EmailEditor from 'react-email-editor';

<EmailEditor projectId={1071} options={{customJS: ['https://cdn.jsdelivr.net/gh/maxt41/unlayer-tools@d874675d04fcf4942f7eef264119af8afc362f1d/LinkCaptureTool.js', 'https://cdn.jsdelivr.net/gh/maxt41/unlayer-tools@d874675d04fcf4942f7eef264119af8afc362f1d/UnsubscribeTool.js']}} ref={emailEditorRef} />

That line alone generates the entire email editor and the customJS: ... references my custom tools.
This is the Email editor in React development mode:

Email editor in development mode
This is the Email editor in React build mode:
Email editor in build mode

Obviously the custom tools are "hosted" elsewhere so I am unsure why when building the app they aren't showing. I have tried making them within the app but I can't figure out how to reference them as customJS tools and I'm unsure if that would fix the issue.

I have tried rebuilding and recreating the Jsdelivr links to no avail. The tools themselves also work perfectly in development. There is no error messages in console or with react dev tools.

max
  • 37
  • 7
  • did you ever get past this? I have a related issue – phainix Jul 12 '23 at 17:06
  • No, it seems you get one custom tool in the free plan though. I could never figure out how to get the free plan to work outside of dev, but if you can, then you get one. – max Jul 13 '23 at 19:40

0 Answers0