Unable to load from remote
Question
I'm trying to load from a remote URL, and nothing ever loads. This is the response I get back from the load function:
Loaded {0: "↵", 1: "{", 2: """, 3: "g", 4: "j", 5: "s", 6: "-", 7: "a", 8: "s", 9: "s", 10: "e", 11: "t", 12: "s", 13: """, 14: ":", 15: "[", 16: "]", 17: ",", 18: """, 19: "g", 20: "j", 21: "s", 22: "-", 23: "c", 24: "s", 25: "s", 26: """, 27: ":", 28: """, 29: "*", 30: "{", 31: "b", 32: "o", 33: "x", 34: "-", 35: "s", 36: "i", 37: "z", 38: "i", 39: "n", 40: "g", 41: ":", 42: " ", 43: "b", 44: "o", 45: "r", 46: "d", 47: "e", 48: "r", 49: "-", 50: "b", 51: "o", 52: "x", 53: ";", 54: "}", 55: "b", 56: "o", 57: "d", 58: "y", 59: "{", 60: "m", 61: "a", 62: "r", 63: "g", 64: "i", 65: "n", 66: ":", 67: "0", 68: ";", 69: "}", 70: """, 71: ",", 72: """, 73: "g", 74: "j", 75: "s", 76: "-", 77: "s", 78: "t", 79: "y", 80: "l", 81: "e", 82: "s", 83: """, 84: ":", 85: "[", 86: "]", 87: ",", 88: """, 89: "g", 90: "j", 91: "s", 92: "-", 93: "h", 94: "t", 95: "m", 96: "l", 97: """, 98: ":", 99: """, …}
I've validated that the JSON is correct. No matter what I do, this is in the console and nothing ever loads
Answers (3)
No I am see what looks to be the correct loading, but the content in the frame doesn't refresh:
{assets: Array(0), css: "*{box-sizing: border-box;}body{margin:0;}", styles: Array(0), html: "<div class="container"><h1>Hello World</h1></div><…></div></div></div></div></div></div></div></div>", components: "[{"tagName":"div","type":"","removable":true,"drag…"options":[]}],"propagate":"components":[]}]}]"}
Be sure to use contentTypeJson: true in your storageManager configuration and read this: https://grapesjs.com/docs/modules/Storage.html
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #597
storageManager: Loading from remote storage
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 jus...
Issue #1431
Load HTML file from remote
I hosted my html content in cloud. Then trying to load the html content in the editor I found the error: "Response to preflight request doe...
Issue #1487
Load from Database
I've got an issue with loading the lory-slider from my mysql db. When i load it back in, the functionality is gone, i cant slide left or ri...
Issue #1887
Get JSON of specific gjs-data-type
I want to export JSON of only a specific gjs-data-type="img" I'm trying this but it doesn't give any result:
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.