question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

storageManager: Loading from remote storage

See original GitHub issue

Hi,

I’m trying to read the HTML and CSS from my database. When I try to load it into the editor, nothing displays. I can store the data just, just cannot load it.

Is this the correct format for the data when you are loading it?

Content-type

application/json

Preview

{gjs-assets: "", gjs-components: "",…}
   gjs-assets : ""
   gjs-components : ""
   gjs-css : "*{box-sizing: border-box;}body{margin:0;}.c1077{padding:10px;}"
   gjs-html : "<div class="c1077">Insert your text here</div>"
   gjs-styles : ""

Response

{"gjs-assets":"","gjs-components":"","gjs-css":"*{box-sizing: border-box;}body{margin:0;}.c1077{padding:10px;}","gjs-html":"<div class=\"c1077\">Insert your text here<\/div>","gjs-styles":""}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
artfcommented, May 17, 2018
1reaction
DeathStaplercommented, Dec 6, 2017

So when I set:

contentTypeJson: true,

resulting in:

storageManager: {
            type: 'remote',
            autoload: true,
            stepsBeforeSave: 1,
            contentTypeJson: true,
            urlStore: "/save-template/2",
            urlLoad: "/load-template/2", 
            params: {},   // For custom values on requests
          },

I can now load from the database. But, now it will not save, because it is sending the data as JSON. How can I send the data as POST variables, but receive it as JSON?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storage Manager - GrapesJS
... editor and is the one used in the storage manager methods in order to store and load your project (locally or remotely...
Read more >
StorageManager - ClearML
StorageManager. class StorageManager()​. StorageManager is helper interface for downloading & uploading files to supported remote storage Support remote ...
Read more >
Custom StorageManager using GrapesJs API Storage Manager
Your code may be saving, but it isnt loading. Try adding autoload to true, or try calling it after you save.
Read more >
Storage Manager 2020 R1 Administrator's Guide | Dell US
In the Storage view, select a FluidFS cluster. · Click the File System tab. · In the File System view, select Cluster Connectivity....
Read more >
MegaRAID Storage Manager not discovering host
Check that the driver for the controller is running in Windows device manager. NOTE: For windows 2008, if you connect to MSM remotely,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found