UNPKG

grapesjs-project-manager

Version:
66 lines (60 loc) 1.87 kB
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Grapesjs Project Manager</title> <link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"> <link rel="stylesheet" href="dist/grapesjs-project-manager.min.css"> <script src="https://unpkg.com/grapesjs"></script> <style> body, html { height: 100%; margin: 0; } </style> </head> <body> <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> <script type="text/javascript"> window.editor = grapesjs.init({ height: '100%', container: '#gjs', showOffsets: true, fromElement: true, noticeOnUnload: false, pageManager: true, storageManager: { type: 'indexeddb' }, plugins: ['grapesjs-project-manager'], pluginsOpts: { 'grapesjs-project-manager': { /* Test here your options */ } } }); const pn = editor.Panels; pn.addButton('options', { id: 'open-templates', className: 'fa fa-folder-o', attributes: { title: 'Open Templates' }, command: 'open-templates', //Open modal }); pn.addButton('views', { id: 'open-pages', className: 'fa fa-file-o', attributes: { title: 'Take Screenshot' }, command: 'open-pages', togglable: false }); </script> </body> </html>