'How to increase width and height of an iframe which is created tinymce editor
I'm using Laravel 5.8 and TinyMCE and I have added an iframe to this editor and make a new post with it.
Then at the Blade, I tried retrieving data like this:
<!-- News Content -->
<div class="text-justify mt-3">
{!! $new->nws_description !!}
</div>
And it correctly shows the content but the only problem is that the iframe is small size.
So I need to increase the width and height of the iframe but don't know how to do that!
Here is the contents of $new->nws_description which is stored at the DB:
<p style="text-align: justify;">Lorem Ipsum Dolor Sit Amet</p>
<p style="text-align: justify;">Lorem Ipsum Dolor Sit Amet</p>
<p dir="ltr" style="text-align: justify;"><code></code></p>
<div class="h_iframe-aparat_embed_frame" style="text-align: center;"><iframe title="iframe-title" src="iframe-link" allowfullscreen="true"></iframe></div>
<p dir="ltr" style="text-align: justify;"><code></code></p>
<p dir="ltr" style="text-align: justify;"> </p>
<div id="4591871988"></div>
<div id="92356425254"></div>
So how to increase the iframe size automatically? So it would be like this:
<iframe width="100%" height="100%" ...
Solution 1:[1]
you can do it with style, just target the element
<style>
.h_iframe-aparat_embed_frame iframe{
width: 100% !important;
height: 100% !important;
}
</style>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Wailan Tirajoh |
