Custom component don't save
If you're referring to having your generated content save and persist upon refresh, try this: var editor = grapesjs.init({ container : '#gjs', storageManager: { // type: 'none' id: 'gjs-', // Prefix identifier that will be used inside storing and loading type: 'local', // Type of the storage autosave: true, // Store d...
Read full answer below ↓Question
my custom component don't save in wrapper editor, when refresh the page the editor load all components less my component. the web inspector show a empty div.
<img width="531" alt="screen shot 2017-12-22 at 3 14 08 pm" src="https://user-images.githubusercontent.com/2053807/34309887-d8a7a5e8-e72a-11e7-823e-5aeea5197866.png"> <img width="1543" alt="screen shot 2017-12-22 at 3 13 50 pm" src="https://user-images.githubusercontent.com/2053807/34309888-d8bcf0a6-e72a-11e7-8f21-e8a28c60c6fa.png">Answers (2)
If you're referring to having your generated content save and persist upon refresh, try this:
var editor = grapesjs.init({ container : '#gjs', storageManager: { // type: 'none' id: 'gjs-', // Prefix identifier that will be used inside storing and loading type: 'local', // Type of the storage autosave: true, // Store data automatically autoload: false, // Autoload stored data on init stepsBeforeSave: 1, // If autosave enabled, indicates how many changes are necessary before store method is triggered storeComponents: false, // Enable/Disable storing of components in JSON format storeStyles: false, // Enable/Disable storing of rules/style in JSON format storeHtml: true, // Enable/Disable storing of components as HTML string storeCss: true, // Enable/Disable storing of rules/style as CSS string },
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 #1756
Drag and Drop not working in resized editor window in Google Chrome
Hi, I developed some components and all works fine in Firefox, Opera browser. In Google chrome also working fine in fullscreen editor mode...
Issue #993
Didn't display data with remote storageManager
Hi, I have a problem: When I copy and paste email template (http://www.charlesmudy.com/respmail/ - I used gjs-open-import-webpage plugin)....
Issue #1357
[Bug]: Body -> Decorations -> Background-image
Version 0.14.25 | Local copy GrapesJS Tested in: Chrome 68, Firefox 61 Add a background image in "Body (Selected #wrapper) -> Decorations -...
Issue #1493
[QUESTION] render() works on the first time but not on subsequent calls
Hello, I've created a custom component that shows images using background-image on a <div> instead of using an <img> element. It's mostly w...
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.