Initial state of editor when new canvas is loaded from remote storage with data: null #4486
Unanswered
contentfree
asked this question in
Q&A
Replies: 1 comment
-
Hi @contentfree here you can see an example of an empty project data https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage {"assets": [], "styles": [], "pages": [{"component": "<div>Initial content</div>"}]} You should also be able to skip the reset of the current data by returning an empty project data |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a process that creates a new template in our backend before showing the Grapesjs editor for that template. I'm using remote storage. It seems that on the initial load from storage manager the result is an empty gjs-frames element and no canvas is shown. This is almost certainly because the data returned of the brand-new template is null.
How do I either A) prevent null data from wiping out the current canvas (built from an element on initialization of the editor) or B) set up my "blank slate" data when I create the template in the backend?
Beta Was this translation helpful? Give feedback.
All reactions