question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to make custom components hoverable/selectable/badgable

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewryan1906commented, 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

0reactions
andrewryan1906commented, Feb 27, 2020

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found