Issue #2136✓ SolvedOpened July 12, 2019by selcukcura2 reactions

Custom component type not found and traits not working after page load

Quick answerby artf2

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)

👍 Most helpfulartfJuly 15, 2019

Try to put your custom component definitions in a plugin and see if it works

alialrabiJuly 16, 2019

@selcukcura are it is working when putting it in plugin ?

selcukcuraJuly 16, 2019

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.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.