Ask A Question

Notifications

You’re not receiving notifications from this thread.

Hotwire and iframes?

Barry Allen asked in Rails

Hey everyone! I am working on a page builder. So the preview is in an iframe.

I am trying to make it so when I click the edit icon on a section in the iframe it displays that form in a sidebar in the parent frame.

Can this be accomplished with Hotwire or am I thinking about this the wrong way?

Reply

Not really a Hotwire thing. You'd have to use postMessage to communicate between the two I believe. https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

Reply

I have the same question.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.