Traits not appear in edit mode when i update grapes version
@alialrabi How do you define traits? Inside blocks or custom components?
Read full answer below βQuestion
Hi artf, i make traits for specific component ,when i saved this component as a json and load again in editor the traits were load correctly and there is no proplem , when i update version of grapesjs traits appear only in first time , when load component again default trait was exist , how can i load traits again , and appear it in edit mode ?
Answers (3)
@alialrabi How do you define traits? Inside blocks or custom components?
@artf i have created traits in custom component like this domComps.addType('assetType', { model: dModel.extend( { init() { this.listenTo(this, 'change:type', this.doStuff); }, doStuff() { }, defaults: Object.assign({}, dModel.prototype.defaults, { traits: [ { name: 'button', label: 'Add', type: 'bu...
@alialrabi you're defining your component with a name assetType but then in isComponent the type is asset
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1696
Traits appear first time when draged custom component
Hi artf , i have created custom component and add traits for it , when dragging this component to editor and select it the setting traits w...
Issue #3482
Runtime updated traits not EDIT mode.
Hello @artf I having issue with a traits. When I drag and drop the block to canvas it's traits showing fine in under settings section. but...
Issue #577
Only allow one component of specific type on editor
is there way to not allow to drop any specific component more than one time on page? I have custom component and user cannot drop it more t...
Issue #3948
My Options ( in traits ) for select component gets resetted every time after each reload of page
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link Not there De...
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
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.
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.