1

I was working in grapesjs and just want to know is there a way to render the HTML and CSS saved in your DB to show inside the grapesJS editor. I saved the HTML and CSS inside the DB and want to render the design inside the editor. is this possible to achieve this in grapesJs?

Jane
  • 127
  • 1
  • 4
  • 13

1 Answers1

4

I finally found this solution. First, save your HTML and CSS inside variables. Then, do this.

editor.setComponents(html);
editor.setStyle(css);
Jane
  • 127
  • 1
  • 4
  • 13