[Question] - UrlLoad and UrlSave
Question
hi,
Grapesjs is a fantastic bit of software and I've been playing with it for a week or so now. Im struggling a little with the urlLoad.
storageManager: {
autosave: true,
setStepsBeforeSave: 2,
type: 'remote',
urlStore: '/rest/V1/aware/save/:page_id',
urlLoad: '/rest/V1/aware/getJson/:page_id',
contentTypeJson: true,
headers: { Authorization: 'Bearer TOKEN' }
}
Im using an end point which is returning json as you can see here:

How I've read the documentation, is this supposed to load the layout into the canvas?
What I'm trying to do, is use the endpoints to save the canvas - and load the canvas etc. But on load nothing happens, I'm left with a blank canvas. Really appreciate if you could point me in the right direction, or a demo etc.
thanks
Answers (1)
The result of your endpoint is totally wrong. Read carefully this part please: https://grapesjs.com/docs/modules/Storage.html#setup-the-server You should return something like this:
{
// `gjs-` is the id prefix
'gjs-components': [{ tagName: 'div', ... }, {...}, ...],
'gjs-style': [{...}, {...}, ...],
}
Now, you're returning only components:
[{ tagName: 'div', ... }, {...}, ...]
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1274
Remote storage option is not sending in $_POST the JSON structure
Hi @artf! I'm working to adapt your content builder in our system using the latest release v.0.14.21. I have set up the following configura...
Issue #1985
[BUG] Autosave with remote storage doesn't send network requests
OS: Windows 10 Browser: Chrome 73 GrapesJS version: 0.14.57 I have remote storage configured using this call to grapesjs.init(): While I se...
Issue #2234
I/O operations with PHP/MySQL - I'm stuck
Hello and thank you for GrapesJS. It's awesome. I do have a question that I haven't been able to find an answer to. I'm using PHP/Yii and M...
Issue #2963
Template loaded via remote storage is not displayed in the editor
Hi, I am trying to load a default template from remote storage into the editor but nothing is displayed. As part of of the initialization I...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.