Whenever you use the code editor and click save, it clears any styles that have been applied through the style manager. I think the issue is that editor.setComponents(html); replaces any css that grapesjs had created for the page. Is there a way to fix this?