Unable to make custom components hoverable/selectable/badgable
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)
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
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...
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.
Issue #3231
How to change gjs-ckeditor-format component
hi guys, we all know that gjs-ckeditor-plugin working with [data-gjs-type]="text" components. I wanna know , could we change this option? I...
Issue #2195
Define components in template
QuestionsHow can I make a part of my template a component ?How can I set draggableComponents on such a component?If so, then can I stop set...
Issue #1336
Can I make everything unselectable by default?
Currently all components are selectable/hoverable by default. And if you want you can change that behavior by providing data-gjs-hoverable=...
Issue #3331
Custom Asset Manager
Hi @artf I followed the documentation to make new type of asset manager here ( https://codepen.io/abhi_punk81/pen/MWbWzaq) I've created new...
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.