Can packages be used in exported web components?

  • /attachments/1313707601975971960/1313707602361978880/Screenshot_2024-12-04_at_4.24.34_PM.png

    Chris Laupama

    1 month ago

    I keep getting errors in my exported web-component that it couldn't find package components?

    I'm using @Andreas Møller markdown block within a web-component and it's just not working.
    Screenshot_2024-12-04_at_4.24.34_PM.png
  • Max

    1 month ago

    Yes, you can use them in exported components. The error is not about the package. The custom action could not find the element with the ID "markdown..."
    Looks like Andreas needs to adjust the code a little 😁
  • The document object is not available in exported components
  • Due to the Shadow DOM, I think
  • Andreas Møller

    1 month ago

    Ah 👍
  • Chris Laupama

    1 month ago

    Do you think this will be fixed for hackathon entries @Andreas Møller ? - otherwise I'll make some changes at my end for standard text.
  • Jacob Kofoed

    1 month ago

    FYI: In custom-actions, you can use the ctx.root instead of document to get the nearest document object. If the component is running in ShadowDOM, it will return the shadow root, otherwise it will return the document as normally.
  • Andreas Møller

    1 month ago

    IT should be fixed now 🙂
    🔥1
  • Thanks !
    🙌🏽1

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.