react-email-editor
react-email-editor copied to clipboard
Load design
Hi.
I can load the editor, save to my database, etc. but I can't load an initial, very simple, template.
Loading a template seems real easy, but i must be missing something. It doesn't load. The editor doesn't even load. I created a template within my unlayer account, grabbed the json, minified it, and used the load function.
unlayer.loadDesign('my json code here')
Does the json need to be escaped or formatted in some way? Note: I'm hardcoding the json just to test. It's not coming from a db or anything fancy.
Please advise
And I'm back... I discovered the correct way to load json. I had to ditch those single quotes.
unlayer.loadDesign({my json code here})
Did you ever manage to save the design to a db and load it back from the db? I am using SQL server and am having trouble saving and loading as json.
@KevinMull, No. I didn't. In an effort to be helpful here's a related article. Good luck.