GrapesJS Pages

by dipaksarkar

HTML

<link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
<script src="https://unpkg.com/grapesjs"></script>
<script src="https://unpkg.com/grapesjs-pages"></script>
<div id="gjs" style="height:0px; overflow:hidden">
    <div style="margin:100px 100px 25px; padding:25px; font:caption">
      This is a demo content from _index.html. You can use this template file for
      development purpose. It won't be stored in your git repository
    </div>
</div>

CSS

body,
    html {
      height: 100%;
      margin: 0;
    }

JavaScript

window.editor = grapesjs.init({
        height: '100%',
        container: '#gjs',
        showOffsets: true,
        fromElement: true,
        noticeOnUnload: false,
        storageManager: false,
        plugins: ['grapesjs-pages'],
        pluginsOpts: {
          'grapesjs-pages': { /* Test here your options  */ }
        }
});