Issue #2921✓ SolvedOpened July 27, 2020by Davidvlv4 reactions

Autosave not working on style manager when classes are disabled

Quick answerby artf4

Thanks for the report, there is a bug with the editor.load method, which could be currently patched in this way Actually, if you have used editor.load() only because it doesn't load on start, that because you have to define your custom storage in a plugin, in that way the autoload (true by default) will work correctly...

Read full answer below ↓

Question

Version: 0.16.18 Are you able to reproduce the bug from the demo? [x ] Yes: https://jsfiddle.net/ju1a0onx/ What is the expected behavior? Autosave should always call the "store" command after a style change, even when the classes are disabled What is the current behavior? When you disable all classes on an element (Or set them all to private - not shown in this sample) and make a style change, the Autosave doesn't kick in, and your changes aren't saved. Are you able to attach screenshots, screencasts or a live demo? [x ] Yes Grapesjs autosave bug.zip

Answers (3)

👍 Most helpfulartfAugust 26, 2020

Thanks for the report, there is a bug with the editor.load method, which could be currently patched in this way Actually, if you have used editor.load() only because it doesn't load on start, that because you have to define your custom storage in a plugin, in that way the autoload (true by default)...

JoshmamroudJuly 30, 2020

@Davidvlv I'm experiencing the same issue. I believe it's a combination of the avoidInlineStyles: 1 in the config and no class being selected. It seems to work as expected with avoidInlineStyles: 0

DavidvlvJuly 31, 2020

I've tried it out, and that setting does stop it from not saving when it should, but it introduces some other issues on our end with how we're using the output later on. We turned on avoidInlineStyles to avoid these issues.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.