GrapesJs and PHP - store and load data to show in editor and as HTML page as well
You're supposed to setup a RESTful API, for example: sql db.php store.php load.php .htaccessAdd this to your .htaccess file Given you add the files to a folder called api you'll have the following endpoints: http://localhost/api/load/{id} load a project with given id http://localhost/api/store/{id} update project with...
Read full answer below ↓Question
I am using GrapesJS to build a simple webpage. I included the script in the following way inside head part : I am using GrapesJS to build a simple webpage. I included the script in the following way inside head part : <script type="text/javascript" src="js/jquery-1.10.2.js"></script> <link rel="stylesheet" type="text/css" href="grapesjs-dev/dist/css/grapes.min.css"> <script type="text/javascript" src="grapesjs-dev/dist/grapes.min.js"></script> HTML: Javascript : So I get in the blocks panel a block namely Simple block which I can drag and drop on the editor. When ever any change is made then...
Answers (3)
You're supposed to setup a RESTful API, for example: sql db.php store.php load.php .htaccessAdd this to your .htaccess file Given you add the files to a folder called api you'll have the following endpoints: http://localhost/api/load/{id} load a project with given id http://localhost/api/store/{id}...
@Ju99ernaut , Q1) are all my frontend code snippets right ? Q2) How can I get the $_POST variable ? In the browser network inspection tab, I only see request payload. $_POST is empty there. Q3) For loading purpose, will the saved data be automatically attached to the editor ?
I guess the $_POST variable only works for url parameters, I've updated the code to use the $data variable, your front end snippets are fine however on load the data will not be automatically attached to the editor since the load method only sends a GET request, you will have to tell the editor wha...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #890
I cannot get the simple example working
I am not new to Javascript but when I try the example: I get a blank page. That is with adding the CSS and Javascript library. Any suggesti...
Issue #1686
CMS: Grapesjs is not defined
I am trying to use basic Grapesjs editor to CMS. Here's my code: I have installed the grapesjs using NPM. Later I tried running this html f...
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 #2120
CSS properties of body (#wrapper) not editable after editor.setComponents(html);
When I save my page in a database refresh, the html and css are set like so $.ajax({ url: "../feeder.php", type: 'POST', processData: false...
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.
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps — a beginner-friendly 2026 comparison
Tutorial
Lighthouse for GrapesJS: Audit Accessibility and SEO Without Leaving the Editor
Live WCAG 2.1/2.2 accessibility auditor + SEO manager for GrapesJS. Every finding is bound to the exact component — click to select, then one-click fix.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners — this post is for you.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.