[Question] - UrlLoad and UrlSave
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
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', ... }, {...}, ...]