unlayer / react-email-editor

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

React component does not have registerTool #105

Closed rexkenley closed 4 years ago

rexkenley commented 4 years ago

Hi

I tried to create some custom tools and noticed that the react component object does not have registerTools.

Will this be added to the component?

adeelraza commented 4 years ago

registerTool is only available inside the customJS. You can pass customJS in the options prop to the React component. Check the docs here: https://docs.unlayer.com/docs/custom-js-css#section-custom-javascript

<EmailEditor
  options={{ customJS: "console.log('I am custom JS!', unlayer.registerTool);" }}
/>
rexkenley commented 4 years ago

So this is not available, since customJS is a premium feature that requires purchase. Is that correct?

adeelraza commented 4 years ago

@rexkenley the free plan allows 1 custom tool, but not the JavaScript one. You can create it using our dashboard GUI. And then pass in the projectId to options.

rexkenley commented 4 years ago

Thank you.