This is probably something that's already been discussed to death here, but here we go...
Me and my little team of email developers here are trying to set up this tool to speed up our own productionlines.
And though it could be really useful, it seems a bit complicated to get running with custom tools.
As we are using a 3rd party system for distribution of emails, there are certain things we need to have added to the buttons and such.
So I tried to add custom tools in, but the documentation doesn't state how it's done in react, or anything about it's syntax, and the "documentation" that is there is for normal JS, not React. Which is actually different.
I did manage to change the Image component's enabling, that was bout it.
Heres the code:
import { useState, useRef, useEffect } from 'react'
import './App.css'
import EmailEditor from 'react-email-editor';
import { CircleLoader } from 'react-spinners';
this is from the types.d.ts for the editor, just goes to show that there isn't anywhere to find this syntax... I just don't get what I should be doing.
Hi,
This is probably something that's already been discussed to death here, but here we go... Me and my little team of email developers here are trying to set up this tool to speed up our own productionlines. And though it could be really useful, it seems a bit complicated to get running with custom tools. As we are using a 3rd party system for distribution of emails, there are certain things we need to have added to the buttons and such. So I tried to add custom tools in, but the documentation doesn't state how it's done in react, or anything about it's syntax, and the "documentation" that is there is for normal JS, not React. Which is actually different. I did manage to change the Image component's enabling, that was bout it. Heres the code:
import { useState, useRef, useEffect } from 'react' import './App.css' import EmailEditor from 'react-email-editor'; import { CircleLoader } from 'react-spinners';
function App() { const emailEditorRef = useRef(null);
const screen = useRef(null);
const [isLoading, setIsLoading] = useState(true);
const [tooSmallScreenSize, setTooSmallScreenSize] = useState(false);
const exportHtml = () => { emailEditorRef.current.editor.exportHtml((data:any) => { const { design, html } = data; console.log('exportHtml', html); }); };
const onLoad = () => { // editor instance is created // you can load your template here; // const templateJson = {}; // emailEditorRef.current.editor.loadDesign(templateJson); }
const onReady = () => { // editor is ready console.log('onReady');
}; useEffect(() => { if (!screen.current) return
}, [])
return (
Screen is too small!
) }
export default App
this is from the types.d.ts for the editor, just goes to show that there isn't anywhere to find this syntax... I just don't get what I should be doing.