+ GrapesJS Webpage Builder is a simple showcase of what is possible to achieve with the
+ GrapesJS
+ core library
+
+ For any hint about the demo check the
+ Webpage Preset repository
+ and open an issue. For problems with the builder itself, open an issue on the main
+ GrapesJS repository
+
+ Being a free and open source project contributors and supporters are extremely welcome.
+ If you like the project support it with a donation of your choice or become a backer/sponsor via
+ Open Collective
+
+
+
+ // Show borders by default
+ pn.getButton('options', 'sw-visibility').set('active', 1);
+
+
+ // Store and load events
+ editor.on('storage:load', function(e) { console.log('Loaded ', e) });
+ editor.on('storage:store', function(e) { console.log('Stored ', e) });
+
+
+ // Do stuff on load
+ editor.on('load', function() {
+ var $ = grapesjs.$;
+
+ // Show logo with the version
+ var logoCont = document.querySelector('.gjs-logo-cont');
+ document.querySelector('.gjs-logo-version').innerHTML = 'v' + grapesjs.version;
+ var logoPanel = document.querySelector('#gjs-pn-commands');
+ logoPanel.appendChild(logoCont);
+
+
+ // Load and show settings and style manager
+ var openTmBtn = pn.getButton('views', 'open-tm');
+ openTmBtn && openTmBtn.set('active', 1);
+ var openSm = pn.getButton('views', 'open-sm');
+ openSm && openSm.set('active', 1);
+
+ // Add Settings Sector
+ var traitsSector = $('