Closed FranklinsHand closed 3 years ago
Grapesjs' built in storages don't work with this plugin, here's the list of supported storage types and how to setup https://github.com/Ju99ernaut/grapesjs-template-manager#localindexeddb
In your case just change type: 'local'
to type: 'indexeddb'
container: '#gjs',
height: '100%',
storageManager: {
id: 'gjs-', // Prefix identifier that will be used on parameters
type: 'indexeddb', // Type of the storage
fromElement: true, //used for tempalate manager
autosave: 0, // Store data automatically
autoload: 1, // Autoload stored data on init
stepsBeforeSave: 1, // If autosave enabled, indicates how many changes are necessary before store method is triggered
},
I switched to indexeddb and made sure indexeddb is working. I am still getting the same errors.
I'm not sure what's wrong on your end, your configuration works fine on my end, anyways the errors you're getting indicate that whichever storage you're using doesn't have the loadAll method, which is available in the indexeddb version that comes built in https://github.com/Ju99ernaut/grapesjs-template-manager/blob/master/src/storage/indexeddb.js
I am working on getting the template manager set up (props btw, tool looks really cool), but I am running into a few issues.
I am on GrapesjsV.17.2, and running everything in the browser. Whenever I use any of the template manager panel buttons, I get the following errors corresponding to their respective button presses.
Uncaught TypeError: t.loadAll is not a function
Uncaught TypeError: e.Storage.getCurrentStorage(...).setIsTemplate is not a function
Uncaught TypeError: e.Storage.getCurrentStorage(...).delete is not a function
This is my code currently index.html
script.js
It's probably something obvious, but if it's not I'll be more than happy to help troubleshoot.