Help in remote storage
Question
The remote storage part isn't very clear in the wiki, I want to know If I can store templates by name as html files in some folder and retrieve them also by name.
Answers (2)
Hi @Eman-Shaaban, GrapesJS is just a client-side library and doesn't deal with back-end stuff. The remote storage just sends data to some server-side script, then it's up to handle it (you can store it inside a file or maybe in some DB table). This is all the code you need
var editor = grapesjs.init({
container : '#gjs',
...
storageManager: {
type: 'remote',
urlStore: 'http://store/endpoint', // <-- here you have to set up your endpoint
urlLoad: 'http://load/endpoint', // <-- here you have to set up your endpoint
}
});
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 #1302
Invalid JSON String - Load Data
I had some problems loading templates. It did not work both the storage in a .json file and the processing in a mysql database. my loading....
Issue #1485
How to prevent styling html components?
Im trying to create some templates, which should not be editable and styleable. So that when i drag in my blocks then should stay as define...
Issue #509
Span are not editable as text
Hello Artf, I have a problem when importing some html templates. I was initially not able to see span texts. But after helping the editor r...
Issue #387
Want to save template name
Hi @artf @sonnylloyd @arthuralmeidap @cmcintosh I am trying to store template name, but not sure how to pass the template name along with t...
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.