Issue #1083Opened May 4, 2018by pintor-mato0 reactions

import template

Question

Hi . I have a json string like this '{ "assets": "[{"type":"image","src":"./img/team1.jpg","unitDim":"px","height":0,"width":0}]", "css": "* { box-sizing: border-box; } body {margin: 0;}", "styles": "[]", "html": "", "components": "[]"}'. Now I want to import it.

Answers (2)

artfMay 5, 20180 reactions

Honestly, I'd recommend following the flow with the storage manager, but in any way, you could achieve it in this way:

const obj = var tt = JSON.parse(yourJsonString);
editor.setComponents(obj.components);
editor. setStyle(obj.styles);
lock[bot]September 17, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.