react-email-editor icon indicating copy to clipboard operation
react-email-editor copied to clipboard

Load design

Open thewebprojects opened this issue 4 years ago • 3 comments

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

thewebprojects avatar Mar 29 '20 21:03 thewebprojects

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})

thewebprojects avatar Mar 30 '20 16:03 thewebprojects

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 avatar Jul 08 '22 15:07 KevinMull

@KevinMull, No. I didn't. In an effort to be helpful here's a related article. Good luck.

thewebprojects avatar Jul 08 '22 15:07 thewebprojects