Open Link in modal

Hi,
I have a link with the target_blank. And I want to open the page not on a new tab, but inside my webpage in a modal ? Like an iFrame …
Did anyone do this before ? A solution for this ? I found this but don’t get it to work.
I also want to use a button created inside blocs app.

Or do you think that this way is better:

Create a Button
Trigger a Modal
Inside the Modal use the syntax iFrame
:thinking:
tom

There are some suggested methods on this site.

Hey @PeteSharp
thanks. Do you have an idea how I can implement a iFrame ?
Sure, I can do it like this:

Bildschirmfoto 2020-03-06 um 18.11.05

but this is not responsive. Only the width is Responsive. But the height not. Do you have an Tipp for me?

@tom2, try removing the height and width settings for the iframe and wrap the iframe in a Div that uses Bootstraps responsive classes.

Hi @PeteSharp
thanks … it doesn’t work. When set a DIV and give it a class embed-responsive blocs app create a video div … When I add a class embed-responsive-item I dont get a video div … But also not working …

But when I insert in a html bric the complete code ( from the link ) it works on Desktop. On mobile the iframe is small and you can scroll inside the iframe. Not perfect …but okay. Do you think this is also a correct way ?

Something wired goes also on. When I create a div and want to set a class I only can type in two letters. I my case “em” then blocs crashed …

And when I want to type inside the code bric the iframe tag I get this:

Bildschirmfoto 2020-03-06 um 23.03.18

Is this normal ?

UPDATE:
Think this is the solution for me. Just use an Html brick and set the css width and height, also no border and the scrolling attribute ( I think only in Html ? ) So in the height I leave a little bit space on the desktop view, and mobile the scrolling attribute helps …

I’m travelling at the moment. Will check it out later today.

No Problem … have a nice day :+1:
thanks a lot

The code editor auto complete when you type < i > you just need to edit it back to < iframe >

I have it working. Let me just get it looking better on smaller screens.

Sorry for the delay, I had to go out… try adding this CSS to the Div wrapping the iFrame with the Bootstrap responsive classes.

<style>
.iframe-fix {
  overflow: hidden;
  padding-top: 56.25%;  // As I understand it, this needs to be a ratio depending on the content. So for 16:9 this is supposed to work well?
  position: relative;
}
.iframe-fix iframe {
   border: 0;
   height: 100%;
   left: 0;
   position: absolute;
   top: 0;
   width: 100%;
}
</style>
<div class="embed-responsive embed-responsive-16by9 iframe-fix">
<iframe class="embed-responsive-item" src="https://myURL"></iframe>
</div>