Open papyr opened 1 month ago
Thank you for the C# example.
I wanted to get the richer structured aspects of the content like imaged and formatting capture/rendered/options etc stored
The editor only exports the page html it does not export other states like changed component properties or assets.
If you want to save page assets like images, css, javascript files you can check the jszip plugin code https://github.com/givanz/VvvebJs/blob/master/libs/builder/plugin-jszip.js#L29-L43 that gets all page assets and generates a zip file with the page and all assets.
ok thanks, I need some help and I can map it on my own, and share if you want.
I need to store newly created forms in the Vvvebjs as tables, and table data.
how do I get the table/div or dom structure as a json object for the user created forms, so that I can save the fields of the form in a table.
My plan is to auto script (new table, from form Json structure, date, text, input etc), the save user data from the forms.
You can use Vvveb.Builder.frameBody
to access page body and iterate over form elements and serialize fields to json.
Vvveb.Builder.frameBody.querySelectorAll("form").forEach(f => {
console.log( JSON.stringify(Object.fromEntries(new FormData(f))) );
});
Hello I have managed with some help, but need to persist as structured content so its easy to recreate and version the pages like wordpress in our .net core CMS.
I think this will also help others, but its just an initial cut, I wanted to get the richer structured aspects of the content like imaged and formatting capture/rendered/options etc stored, can you you please help. I will make it a nuget package
//Index.cshtml