Executing editor.load(x) on x = editor.store() results in error.
Yes, I see that .load takes a callback function. I'll admit, I'm probably doing this wrong. I only started using grapesJS a few days ago. If my bug report is not truly a bug, how would one store the current state of the editor (possibly as json), then reload it? Is there a specific function to call that accepts a vari...
Read full answer below āQuestion
Version: 0.16.18 Are you able to reproduce the bug from the demo? [X ] Yes [ ] No What is the expected behavior? I would expect that assets, components, css, html, and styles would be repopulated. Describe the bug detailed I am working on an existing system that has a database schema preventing me from using the StorageManager built into grapesjs. I am attempting to store the current state of the GrapesJS editor into a javascript variable, and then reload it - using editor.store() and editor.load() respectively. According to the documentation, these features are listed as part of the editor,...
Answers (3)
Yes, I see that .load takes a callback function. I'll admit, I'm probably doing this wrong. I only started using grapesJS a few days ago. If my bug report is not truly a bug, how would one store the current state of the editor (possibly as json), then reload it? Is there a specific function to call...
I'm investigating https://grapesjs.com/docs/modules/Storage.html#storage-api but I still would like to just be able to 'set and forget' :)
There is an example which illustrates exactly what you're looking for https://grapesjs.com/docs/modules/Storage.html#define-new-storage
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3731
Text element not able to be selected twice after extended with events
Version: 0.17.25 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? Update a existing component o...
Issue #3343
Illegal Invocation error when using keepEmptyTextNodes
Version: 0.16.44 Are you able to reproduce the bug from the demo?[x] Yes[ ] No Set editor.Parser.getConfig().keepEmptyTextNodes = true; in...
Issue #3295
BUG (v0.16.41): Button component with draggable property is not working properly
Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes [ ] No What is the expected behavior? When we have a button with...
Issue #3622
I18n functionality
Version: latest Are you able to reproduce the bug from the demo?[] Yes[ ] No What is the expected behavior? to editor.I18n.setLocale("es")...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins ā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.