How can i export to html code?
How can i export to html code?
use
Just click the button below and you'll get HTML and CSS

Hey Art.
Thinking of using GrapeJS in a school room project. Like for students to be able to create simple "about me page" and then export.
Is there a simpler way for them to export? Like a page with the complete build, all HTML, JS (if any) and CSS? This way they could just save as HTML page.
Thanks for any input.
Woody
Hi @2braincells2go , do you mean something like 'Export to ZIP'?
Hey Art.
"do you mean something like 'Export to ZIP'?" that would be ideal but even a folder would work.
Totally understand Grapejs is for CMS but would be excellent for a local editor:)
Thanks much,
Woody
@2braincells2go Indeed, I think I'll gonna create a plugin for this purpose :)
@2braincells2go Hey Woody, I updated the demo with this new plugin: https://github.com/artf/grapesjs-plugin-export You should see now the export button inside 'Export template' dialog Unfortunately doesn't export images at the moment but maybe soon :) Thanks for the advice
That is cool Art! Can't wait to see if images can be incorporated.
Thank you much.
woody
@artf First thanks for grapesjs, it is really amazing!
Second: I have been trying some approaches to save a sample image (from URL) inside the .zip file. After being able to save a valid image from URL inside the .zip file, exporting all images should be easier.
My main problem is that I can save any text file from URL and add it to the .zip (it works nice) but I cannot do the same with images, probably the image headers are missing or the image is broken when saving it as a string.
This is a part of the current .zip creation function with my additional file:
imagentest1rm.file("28b2682305f6d0cce43e21f38379d8a5.jpg", jpegImg),e.generateAsync({
Do you have any clue about how can I save a valid image that I got from URL in the jpegImg var?
Thanks a lot!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.