react-email-editor
react-email-editor copied to clipboard
Legacy mode can't load another design after the first
this.editor.loadDesign({ html: this.props.templateHtml, classic: true, });
i'm using this to load the design, but only works the first time, if i try to load another the editor doesn't change
I had the same issue and fixed it by first loading blank design. (a bit hacky solution)
useEffect(() => {
unlayer.loadBlank()
unlayer.loadDesign({
html: template.body,
classic: true,
})
}
}, [template])
Hope it helps! Using vanilla unlayer in functional component with React 17.