Unable to make custom components hoverable/selectable/badgable
See original GitHub issueI’m using GrapesJs with Angular and am extending the functionality using Angular components. So my template looks like this:
<rs-wc-custom-component lock_editing_in_pages custom-component-id="custom_component-KG3g7xE6Yf2SzTRTPA8ESjULVAlwmCsi" id="ij1i">
</rs-wc-custom-component>
<rs-wc-menu lock_editing_in_pages id="i1un">
</rs-wc-menu>
<div class="container">
<div lock_editing_in_pages id="icom">
<p>Insert your text here
</p>
</div>
</div>
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 need to do to make these selectable?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
[help] Failed to create custom components #292 - GitHub
Essentially, create a custom .svelte component that styles the element the way you need it to. Import that into components.js then export it...
Read more >Unable to Use Custom Component in Main Page - Typescript ...
Functional components receive one parameter: props . You can use the whole object or destructure it, but you can't pass more than one....
Read more >How to add custom components to custom models
I created a custom component using React, and it appears in my Page ... navigation dropdown inside my custom model, but I can...
Read more >UI custom component deploys successfully to instan...
We were able to deploy in the other two instances, and the component is showing up, the problem is that we had to...
Read more >Managing Visualforce Custom Components - Salesforce Help
After creating custom components you can view edit and delete them. ... You can't edit or delete a Visualforce custom component in a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
@tasham16 I didn’t need to include Zone; I’m running GrapesJS in my Angular app so it already has Zone.
I included components via a custom pugin, and blocks after the initialization. Check out the documentation, they give really good examples of this. Also check out the source code for grapes-js-preset-webpage.
Andrew