looking for web development and help me with some project that i’m facing now. Please let me know if anyone can help
Talk us through it. Who knows? Maybe some ideas will jump out.
Ok, so I want to make a website builder and I use an open source one from github https://github.com/artf/grapesjs
I have a problem to save the content to database like after you make a website, store it into database then post it. There’s already some people that asked this question https://github.com/artf/grapesjs/issues/122 but I still cant figure it out.
Someone suggest to put the code like this
// Add the button
editor.Panels.addButton(‘options’, [{
id: ‘save-db’,
className: ‘fa fa-flopy icon-flopy’,
command: ‘save-db’,
attributes: {title: ‘Save DB’}
}]);
// Add the command
editor.Commands.add(‘save-db’, {
run: function(editor, sender) {
sender && sender.set(‘active’, 0); // turn off the button
editor.store();
}
});
All those above worked perfectly fine until the part where I need to setup my remote store
var editor = grapesjs.init({
container : ‘#gjs’,
…
storageManager: {
type: ‘remote’,
params: {}, // For custom values on requests
// your SERVER endpoints
urlStore: ‘http://store/endpoint’,
urlLoad: ‘http://load/endpoint’,
}
});
I tried to put some code but it wont insert it into my database. so What urlStore and urlLoad supossed to contain? please help me quide though it