grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

How can i export to html code?

Open 18916204759 opened this issue 10 years ago • 9 comments

How can i export to html code? use , need add some div outer the code?

18916204759 avatar Feb 15 '16 07:02 18916204759

Just click the button below and you'll get HTML and CSS export-btn

artf avatar Feb 15 '16 19:02 artf

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

2braincells2go avatar Aug 05 '16 17:08 2braincells2go

Hi @2braincells2go , do you mean something like 'Export to ZIP'?

artf avatar Aug 06 '16 09:08 artf

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 avatar Aug 06 '16 13:08 2braincells2go

@2braincells2go Indeed, I think I'll gonna create a plugin for this purpose :)

artf avatar Aug 08 '16 11:08 artf

@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

artf avatar Aug 08 '16 21:08 artf

That is cool Art! Can't wait to see if images can be incorporated.

Thank you much.

woody

2braincells2go avatar Aug 08 '16 21:08 2braincells2go

@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!

jmrgz avatar Apr 07 '18 12:04 jmrgz

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.

lock[bot] avatar Sep 17 '19 19:09 lock[bot]