Hi @artf , sorry to bother but I would like to know if there is any way that we can export files where the file name and its content are inside an array?
Example, I know I can do this:
...
'grapesjs-plugin-export': {
addExportBtn: false,
btnLabel: "Export ZIP",
filenamePfx: "GrapeJS-Project",
filename: null,
root: {
some_folder: { // This creates a folder named some_folder
'some_file.text': 'This is the content of the file'
}
}
}
...
But is there a way to make something similar (below) or any logic that I can add files inside array? Like this example:
'grapesjs-plugin-export': {
addExportBtn: false,
btnLabel: "Export ZIP",
filenamePfx: "GrapeJS-Project",
filename: null,
root: {
some_folder: {
for(let i=0; i < array.length ; i++) // THIS IS AN EXAMPLE OF WHAT I WANT
array[i].filename: array[i].filecontent // THIS IS AN EXAMPLE OF WHAT I WANT
}
}
}
Hi @artf , sorry to bother but I would like to know if there is any way that we can export files where the file name and its content are inside an array? Example, I know I can do this:
But is there a way to make something similar (below) or any logic that I can add files inside array? Like this example: