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
6.91k stars 1.59k forks source link

Start the editor with a blank page without loading a file #272

Open DgMorais opened 1 year ago

DgMorais commented 1 year ago

I'm using a PHP framework, is there an option to load a blank page when starting the editor instead of starting with a ready page?

the-ameen commented 1 year ago

Load the page with javascript when needed.

givanz commented 1 year ago

Hi

You can use about:none to load a really blank page

Vvveb.Builder.init('about:none', function() {
});

But I recommend using a basic html template like blank.html that has all the basic tags like <head><body> etc because not all browsers will fill all the missing basic elements and this can lead to all kind of issues.

Also the editor comes with bootstrap components that will need bootstrap.css to be loaded in the edited page to work, you will need to remove boostrap components if the css is not loaded in the page.

You can use the included new-page-blank-template.html as a base to customize your own blank.html.