HansSchouten / PHPageBuilder

A drag and drop page builder to manage pages in any PHP project
https://www.phpagebuilder.com
MIT License
739 stars 180 forks source link

Is there any way to export page as html file? #137

Open shibinskov opened 2 years ago

shibinskov commented 2 years ago

Is there any way to export the page as an HTML file? like in the grapejs export each page as HTML and CSS?

HansSchouten commented 2 years ago

You could do something like this:

ob_start();
$pageBuilder = new PHPageBuilder\PHPageBuilder($config);
$pageBuilder->handlePublicRequest();
$html = ob_get_contents();
ob_end_clean();

file_put_contents('export.html', $html);
shibinskov commented 1 year ago

Thank you for the comment. Yeah, it will export as HTML. I extracted the CSS, JS, and images from that and put them in a separate folder.

SGD-DEV commented 1 year ago

Can you please share the file where the change is located?