Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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;">&nbsp;</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 :

Yes, it can be done using JavaScript, here you can find how to do it: https://www.w3schools.com/jsref/prop_iframe_height.asp

There are also some answer here using jquery How to increase height of tinymce Iframe?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading