You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"id": "PROJECT_ID",
"data": {
"assets": [],
"styles": [],
"pages": [
{} // this obj has all the stuff for page 1
{} // this obj has all the stuff for page 2
],
"symbols": [],
"dataSources": []
}
}
Each time we make a change to a page
The new version of the page should be saved
What's the best way to implement this?
Currently, I'm thinking of creating an object like below
Each time we edit a page, we add a new object to the corresponding page with its new changes
"allPageVersions": [
page1: [{}, {}] // new objs will be added every time we save page1
page2: [{}, {}] // new objs will be added every time we save page2
]
We'll store the object above in our GrapeJS data like
{
"id": "PROJECT_ID",
"data": {
"assets": [],
"styles": [],
"pages": [
{} // this obj has all the stuff for page 1
{} // this obj has all the stuff for page 2
],
"allPageVersions": [
page1: [{}, {}] // new objs will be added every time we save page1
page2: [{}, {}] // new objs will be added every time we save page2
]
"symbols": [],
"dataSources": []
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We have two pages in our GrapeJS editor.
Our GrapeJS data is structured like:
Each time we make a change to a page
The new version of the page should be saved
What's the best way to implement this?
Currently, I'm thinking of creating an object like below
Each time we edit a page, we add a new object to the corresponding page with its new changes
We'll store the object above in our GrapeJS data like
Is there a better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions