Open projects and templates not working
huzaifaazim0 opened this issue · comments
Hello,
I just installed the plugin and perform the exact steps in the docs and the open project button is failing with the below error
TypeError: t.loadAll is not a function. (In 't.loadAll((function(t){e({sites:t,loading:!1})}),(function(e){return console.log("Error",e)}))', 't.loadAll' is undefined)
my configuration
`var editor = grapesjs.init({
height: '100%',
showOffsets: 1,
noticeOnUnload: 0,
storageManager: { autoload: 0 },
container: '#gjs',
fromElement: true,
pageManager: true,
plugins: ['gjs-preset-webpage','grapesjs-project-manager','gjs-aviary'],
pluginsOpts: {
'gjs-preset-webpage': {},
'gjs-aviary': {/* ...options */}
}
});
// Running commands from panels
const pn = editor.Panels;
pn.addButton('options', {
id: 'open-templates',
className: 'fa fa-folder-o',
attributes: {
title: 'Open projects and 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
});`
Error was just because I didn't use store manager
By using store manager error should be fixed