Issue #2506πŸ’¬ AnsweredOpened Jan 13, 2020by andrewryan19061 reactions

Unable to make custom components hoverable/selectable/badgable

Quick answerby andrewryan1906❀ 1

So, What I ended up doing instead is using Angular elements, but NOT compiling the elements into a web component (wanted to avoid the extra complexity). This kept me from having to switch out the DOM elements, and so GrapesJS editor is playing nice. No more issue. Thanks! Andrew

Read full answer below ↓

Question

I'm using GrapesJs with Angular and am extending the functionality using Angular components. So my template looks like this: This all works fine; I've added DomComponents to the designer, and the components show up in the layer designer and I can even change traits with no problem. Everything renders as it should. However; while I can select my Text component and see a badge, I cannot select rs-wc-custom-component or rs-wc-menu. When I click on the items, there's no blue rectangle and no badge is shown; the only way I can select/change them is through the Layer panel on the left. What do I ne...

Answers (3)

andrewryan1906β€’ Jan 21, 2020

So,

What I ended up doing instead is using Angular elements, but NOT compiling the elements into a web component (wanted to avoid the extra complexity). This kept me from having to switch out the DOM elements, and so GrapesJS editor is playing nice. No more issue.

Thanks! Andrew

andrewryan1906β€’ Jan 13, 2020

This might help. As part of processing the element, I'm swapping it out with my Angular element on the fly... so, after rs-wc-custom-component tag is rendered, I wait 1 ms and generate a dynamic Angular component, and swap out the rs-wc-custom-component with my dynamic Angular component. Could that...

artfβ€’ Jan 18, 2020

As part of processing the element, I'm swapping it out with my Angular element on the fly... so, after rs-wc-custom-component tag is rendered, I wait 1 ms and generate a dynamic Angular component, and swap out the rs-wc-custom-component with my dynamic Angular component. Definitely this sounds like...

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.