Custom component type not found and traits not working after page load
Try to put your custom component definitions in a plugin and see if it works
Read full answer below ↓Question
Hi @artf I have created a very basic custom component named 'customsection' which uses traits to change the component's background-color by adding a class. Pretty straightforward. I have created two blocks:Section - includes only the component.Section collection - includes a collection of DOM elements and the component. Unfortunately, I'm having 2 issues as detailed below.Issue 1:A block with custom component is dropped in canvas - visually appears fine.When changes are saved via local storage and page is reloaded - the following console warning appears: "Component type 'customsection' not fo...
Answers (3)
Try to put your custom component definitions in a plugin and see if it works
@selcukcura are it is working when putting it in plugin ?
Much appreciated @artf, placing my custom component in a plugin solved both issues! Out of curiousity, are there any particular reasons why it now works as a plugin and not otherwise ? @alialrabi Yes, I managed to get it working. Try using the plugin boilerplate if you haven't already.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3213
How to save the dynamically added traits
Hi, @artf, I have a custom component that has a button trait. When the button is pressed, I am adding a custom trait dynamically using comp...
Issue #2226
[QUESTION] Updating a component type trait definition after init
I have created a custom component & block which is used to display/embed uploaded files. I have defined traits for this component see below...
Issue #2952
Custom component is not working after saving.
Hi, I have Button-Link custom component created, and when I dragged into canvas for the first time component is detecting its attributes an...
Issue #1683
How to change id/class when new element drop on editor or render element with dynamic ip?
Hello @artf , Hope you are doing well. I have two questions regards dynamic blocks adding, 1) Is it possible to render the block with dynam...
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 →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.