After JSON.stringify Components have not all fields
If the property is of the same value as the default definition, it's skipped. This is controlled by avoidDefaults config option and it's highly recommended to keep it true to have small JSONs as possible.
Read full answer below โQuestion
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeReproducible demo link https://jsfiddle.net/sdimitrenco/rn8u4pc0/7/Describe the bug I'm not sure it's a bug or not, but for me, behavior look strange I have a component List that includes, component ol and component li. That code for block That model for the component list That model for the ol component And the model for the li component As you can see all models include types and tag Names, and inside grapes it work correct, but if I try convert it to json, like JSON.stringify(this.grapesIns...
Answers (2)
If the property is of the same value as the default definition, it's skipped. This is controlled by avoidDefaults config option and it's highly recommended to keep it true to have small JSONs as possible.
This behavior is not a bug but an intentional optimization within GrapesJS, which leverages Backbone.js models. When you serialize GrapesJS components to JSON, attributes that match their default values for that specific component type are often omitted to reduce the size of the serialized data. Ro...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4752
Component with pointer-events: 'all' (except wrapper) or editable component are draggable & droppable to itself.
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 107.0.5304.121 (Official Build) (arm6...
Issue #5720
Propagating component defaults can break layers when child comments are introduced
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v122 Reproducible demo link https:/...
Issue #5424
`component:styleUpdate` event is not fired
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 116.0.5845.187Reproducible demo link...
Issue #4897
Component:styleUpdate / component:styleUpdate:propertyName not fired
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Edge 109.0.1518.70 Reproducible demo link...
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
Introducing GJS.Market Services: ship your GrapesJS editor without the integration risk
It's everything that usually eats weeks of engineering time, scoped and priced up front. No open-ended hourly surprises.
Tutorial
GrapesJS custom components guide (2026)
Define custom GrapesJS components with DomComponents.addType: detection with isComponent, a model with traits and defaults, and a view for canvas behavior.
Tutorial
Building an AI-Assisted Document Engine with Next.js, GrapesJS, and the AI SDK
Transform your static template editor into an intelligent, generative design workspace with Vercel AI SDK, AI Elements and Next.js.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.