Load HTML file from remote
You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage
Read full answer below ↓Question
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 doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled." My code: const editor = () => grapesjs.init({ container: '#editor-portal', canvas: { styles: ['https://codepen.io/mrajeshkrossark/pen/mGLyJX.css'] }, plugins: ['gjs-p...
Answers (3)
You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage
> You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storageI tried with below endpoints that also shows errorstorageManager: {type: 'remote',storeHtml: true,storeCss: true,contentTypeHTML:...
You're pointing your storage manager to a website. You need endpoints that can handle the requests. https://grapesjs.com/docs/modules/Storage.html#setup-remote-storage I tried with below endpoints that also shows error storageManager: { type: 'remote', storeHtml: true, storeCss: true, contentTypeHT...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1059
[Question]: Load html content from a file dynamically
Hi, I need to load content from a html file from server onto editor after or while initializing editor. How this can be implemented? HTML w...
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 #1242
[FEATURE REQUEST]: JSON to HTML parsing
Is there any support for JSON to HTML rendering, so that we can get control over the content to be published in the newsletter or webpage....
Issue #537
Adding a request header on beforeSend
Im using storageManager remote but the site has csrf token beforeSend: function (t) { var token = $('meta[name="csrf_token"]').attr('conten...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.