Issue #6102✓ SolvedOpened August 31, 2024by Alababdiy5 reactions

Traits Not Displayed After Reloading Editor for Custom Component

Quick answerby mohamedsalem4015

@Alababdiy I was unable to reproduce the issue using the link provided. However, it seems like the issue is that GrapesJS doesn't allow adding or defining a component after it has been initialized.

Read full answer below ↓

Question

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 91VReproducible demo link https://jsfiddle.net/8tsj5vpb/Describe the bug I'm encountering an issue with GrapesJS where traits defined for a custom component are not being displayed after reloading the editor. The traits work correctly when the component is first added, but upon reloading the editor (e.g., refreshing the page), the traits no longer appear in the traits panel. Steps to Reproduce:Define a custom component type using editor.DomComponents.addType, including traits in the defaults...

Answers (3)

👍 Most helpfulmohamedsalem401September 9, 2024

@Alababdiy I was unable to reproduce the issue using the link provided. However, it seems like the issue is that GrapesJS doesn't allow adding or defining a component after it has been initialized.

mohamedsalem401August 31, 2024

Hey @Alababdiy, I wasn't able to reproduce the issue you described in the JSFiddle.

GJS HelperMay 17, 2026

You've encountered a common issue related to how GrapesJS persists and re-identifies custom components after reloading the editor. The traits for your custom component disappear because GrapesJS is not correctly re-associating the loaded component with its custom type definition. Root Cause The pri...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.