GrapesJS / export

Export GrapesJS templates in a zip archive
BSD 3-Clause "New" or "Revised" License
76 stars 68 forks source link

Options not being applied (filenamePfx and root) #13

Closed benjorah closed 3 years ago

benjorah commented 3 years ago

Hello, great work. on grape...really loving it. I have a problem where some options in the config are not being applied...they are filenamePfx, root * ( it uses the default zip file prefix and the folder structure remains as the default). Here is a snippet of the options I am using.

{
            filenamePfx: 'some_prefix',
            filename: null,
            root: {
               'style.css': ed => ed.getCss(),
                'index.html': ed =>
                    `<!doctype html>
            <html lang="en">
              <head>
                <meta charset="utf-8">
                <link rel="stylesheet" href="./style.css">
              </head>
              <body>${ed.getHtml()}</body>
            <html>`
            }
        }

I have played with the options a bit and can confirm that addExportBtn and btnLabel are being applied.

benjorah commented 3 years ago

For anyone that faces this issue in the future (not likely)..I had v0.15 in my project and was viewing documentation for v1.0.7 (face palm). Update to the right version and you should get results you expect.