givanz / VvvebJs

Drag and drop page builder library written in vanilla javascript without dependencies or build tools.
https://www.vvveb.com/vvvebjs/editor.html
Apache License 2.0
7.3k stars 1.66k forks source link

missing files from zip download #150

Open goldbartech opened 4 years ago

goldbartech commented 4 years ago

hi, I download zip file and when i extracted I get following error in console

https://www.dropbox.com/s/oqp1g6h0kpewpzk/Screenshot%202020-05-25%2012.24.23.png?dl=0

oleteacher commented 4 years ago

Think you trying on local machine and not live server?

givanz commented 4 years ago

Hi

If editor.html is opened directly from filesystem it doesn't work because of recent changes to chrome and firefox iframe security.

The best alternative is to use a web server like xampp/wampp or use apache/nginx directly and open editor.html from the server like http://localhost/vvvebjs/editor.html

For Chrome you can disable it by starting chrome from cmd with

-allow-file-access-from-files — disable-web-security — user-data-dir — disable-features=CrossSiteDocumentBlockingIfIsolating

more info https://medium.com/@siddhartha.ng/disable-cross-origin-on-chrome-for-localhost-c644b131db19

xXxTheDarkprogramerxXx commented 3 years ago

I Got the Zip to work however I've done it in ASP.net

What I did do was use the uncommented code from the plugin-jszi.js Remove this return

//return;//commented out
//example of the code creator
    var zip = new JSZip();
    zip.file("Index.html", Vvveb.Builder.getHtml());
    jQuery.each(assets, function (index, item) {
        if (item.indexOf("css") > 0) {
            //zip.Folder//add CSS imagex ext directories here like you need them
        }
        //zip.folder()
    });
    //var img = zip.folder("images");
    //img.file("smile.gif", imgData, {base64: true});
    zip.generateAsync({type:"blob"})
    .then(function(blob) {
        // see FileSaver.js
        saveAs(blob, "yoursite.zip");//just name it something
    });
};
fasteddys commented 2 years ago

@xXxTheDarkprogramerxXx can you share some more information on how you handles the pages on the backend controller

Also did you add ASP MVC views as each page.