IndexedDB Storage

IndexedDB storage wrapper for GrapesJS

Instruction:

+
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="path/to/grapesjs-indexeddb.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  var editor = grapesjs.init({
      container : '#gjs',
      ...
      storageManager: { type: 'indexeddb' },
      plugins: ['grapesjs-indexeddb'],
      pluginsOpts: {
        'grapesjs-indexeddb': {
          options: {
            // In case of multiple projects on the same page indicate an id to
            // prevent collisions
            key: 'user-project-id',
            // Update IndexedDB name for the DB and the table containing project data
            dbName: 'editorLocalData',
            objectStoreName: 'projects',
          }
        }
      }
  });
</script>
Share this item:
Last Update:Sep 22, 2022
Published:Sep 22, 2022
Versions:
0.19.x0.20.x
0

0 reviews

5
0
4
0
3
0
2
0
1
0

Product Reviews (0)

Sort By :

No Reviews Found

Question and Answers (0)

No question found

Share this item: