Issue #709💬 AnsweredOpened January 4, 2018by NicholasGati0 reactions

IsComponent is not returning trait

Quick answerby artf

Hi Nicholas, are you defining selectReference inside a plugin?

Read full answer below ↓

Question

Happy new year! I am having an issue with isComponent(). Here is my code: For some reason the only time the trait shows up in component settings is when I remove the if-statement completely from isComponent() and just return { type: 'selectReference' }. However, it becomes a trait of everything then. I have checked the el.tagName values and they are what I expect them to be. I have also made sure that I have the correct el.id values. I even checked the if-statement itself and it does indeed pass through the if-statement logs the output correctly. So, I am confused as to why the trait is not b...

Answers (3)

artfJanuary 4, 2018

Hi Nicholas, are you defining selectReference inside a plugin?

NicholasGatiJanuary 4, 2018

Hey Artur. Yes, it's inside of a plugin.

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.