Issue #1049💬 AnsweredOpened April 16, 2018by dsgh0 reactions

Calling setStyle does not update storage, unlike setComponents

快速解答by lock[bot]

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.

Read full answer below ↓

Question

I'm configuring grapesjs in a way to allow users to edit the html and css source (by calling setComponents and setStyle respectively). There is an issue regarding the storeManager where the html is stored correctly, but the css is not. Here is a fiddle showing this: https://jsfiddle.net/szLp8h4n/189/

Steps to reproduce

  1. Go into the linked fiddle
  2. Run the fiddle
  3. Open the "extended" code panels by clicking the 'Open code' icon in the top right corner (make sure the screen is wide enough that you can see it).
  4. Change the html
  5. Reload the page (or re-run the fiddle)
  6. Notice your html changes were maintained 🙂
  7. Re-open the "extended" code panels, now change the css
  8. Reload the page (or re-run the fiddle)
  9. Notice your css changes were not maintained 🙁

Answers (1)

lock[bot]September 17, 2019

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.