A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/GrapesJS/storage-firestore below:

GrapesJS/storage-firestore: Cloud Firestore storage wrapper for GrapesJS

GrapesJS storage wrapper for Cloud Firestore, flexible, scalable NoSQL cloud database to store and sync data for client/server-side development.

Requires GrapesJS v0.19.* or higher

Option Description Default type Type id used to register the new storage. You can use this option in case you want to replace the already available storages (eg. remote). 'firestore' apiKey Firebase API key '' authDomain Firebase Auth domain '' projectId Cloud Firestore project ID '' docId Document id 'gjs' collectionName Collection name 'projects' enableOffline Enable support for offline data persistence true settings Firestore database settings { timestampsInSnapshots: true }

Before start using this plugin you have to create and enable Cloud Firestore project in Firebase Console. When you create a Firestore project, it also enables its API, which you can get from Cloud API Manager.

<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-firestore.min.js"></script>

<script src="https://www.gstatic.com/firebasejs/8.10.1/firebase.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.1/firebase-firestore.js"></script>

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

<script type="text/javascript">
  var editor = grapesjs.init({
      container : '#gjs',
      ...
      storageManager: { type: 'firestore' },
      plugins: ['grapesjs-firestore'],
      pluginsOpts: {
        'grapesjs-firestore': {
          docId: 'someID',
          apiKey: '<API_KEY>',
          authDomain: '<PROJECT_ID>.firebaseapp.com',
          projectId: '<PROJECT_ID>',
        }
      }
  });
</script>

By default, Firebase allows everyone to read/write data inside your DB by knowing the API credentials, which is ok for the first setup and development but, obviously, not for production. To get more about the Firestore security checkout this guide.

Clone the repository

$ git clone https://github.com/GrapesJS/storage-firestore.git
$ cd grapesjs-firestore

Install dependencies

Start the dev server

BSD 3-Clause


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4