loadDesign method returns console errors
NielsDarcis opened this issue · 3 comments
On rendering of the component, my prop (object) passed from the parent contains the JSON object as a property. But When I render the component I got console errors. What I'm a doing wrong here?
<EmailEditor ref="emailEditor" :min-height="minHeight" @load="editorLoaded" />
editorLoaded() { // Pass the template JSON here console.log(this.newsletterTemplate) this.$refs.emailEditor.editor.loadDesign(this.newsletterTemplate.model) },
JSON Object
model: "{\"counters\":{\"u_column\":4,\"u_row\":2},\"body\":{\"rows\":[{\"cells\":[1],\"columns\":[{\"contents\":[],\"values\":{\"backgroundColor\":\"\",\"padding\":\"0px\",\"border\":{},\"_meta\":{\"htmlID\":\"u_column_1\",\"htmlClassNames\":\"u_column\"}}}],\"values\":{\"displayCondition\":null,\"columns\":false,\"backgroundColor\":\"\",\"columnsBackgroundColor\":\"\",\"backgroundImage\":{\"url\":\"\",\"fullWidth\":true,\"repeat\":false,\"center\":true,\"cover\":false},\"padding\":\"0px\",\"hideDesktop\":false,\"_meta\":{\"htmlID\":\"u_row_1\",\"htmlClassNames\":\"u_row\"},\"selectable\":true,\"draggable\":true,\"duplicatable\":true,\"deletable\":true,\"hideable\":true}},{\"cells\":[1,1,1],\"columns\":[{\"contents\":[],\"values\":{\"backgroundColor\":\"\",\"padding\":\"0px\",\"border\":{},\"_meta\":{\"htmlID\":\"u_column_2\",\"htmlClassNames\":\"u_column\"}}},{\"contents\":[],\"values\":{\"backgroundColor\":\"\",\"padding\":\"0px\",\"border\":{},\"_meta\":{\"htmlID\":\"u_column_3\",\"htmlClassNames\":\"u_column\"}}},{\"contents\":[],\"values\":{\"backgroundColor\":\"\",\"padding\":\"0px\",\"border\":{},\"_meta\":{\"htmlID\":\"u_column_4\",\"htmlClassNames\":\"u_column\"}}}],\"values\":{\"displayCondition\":null,\"columns\":false,\"backgroundColor\":\"\",\"columnsBackgroundColor\":\"\",\"backgroundImage\":{\"url\":\"\",\"fullWidth\":true,\"repeat\":false,\"center\":true,\"cover\":false},\"padding\":\"0px\",\"_meta\":{\"htmlID\":\"u_row_2\",\"htmlClassNames\":\"u_row\"},\"selectable\":true,\"draggable\":true,\"duplicatable\":true,\"deletable\":true,\"hideable\":true}}],\"values\":{\"textColor\":\"#000000\",\"backgroundColor\":\"#e7e7e7\",\"backgroundImage\":{\"url\":\"\",\"fullWidth\":true,\"repeat\":false,\"center\":true,\"cover\":false},\"contentWidth\":\"500px\",\"contentAlign\":\"center\",\"fontFamily\":{\"label\":\"Arial\",\"value\":\"arial,helvetica,sans-serif\"},\"preheaderText\":\"\",\"linkStyle\":{\"body\":true,\"linkColor\":\"#0000ee\",\"linkHoverColor\":\"#0000ee\",\"linkUnderline\":true,\"linkHoverUnderline\":true},\"_meta\":{\"htmlID\":\"u_body\",\"htmlClassNames\":\"u_body\"}}},\"schemaVersion\":6}
JSON was incorrect :D
What it was incorrect on JSON? :)
I have the same issue...