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%"...
you can do it with style, just target the element
<style>
.h_iframe-aparat_embed_frame iframe{
width: 100% !important;
height: 100% !important;
}
</style>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.