TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: Underdog on January 07, 2025, 06:12:29 PM

Title: iframes or embedded objects in block codes
Post by: Underdog on January 07, 2025, 06:12:29 PM

I noticed that iframes or embedded objects within HTML or PHP blocks do not display properly for a responsive layout.
Perhaps someone can add JQuery (or vanilla JS for SMF 2.0 if you still support it) that wraps the iframe or object in a div to style it properly for responsive display?

Like an each loop wrapping them in a div with an added class where that class forces it to max out at the width/height of the block body.

Title: Re: iframes or embedded objects in block codes
Post by: Underdog on January 07, 2025, 11:28:55 PM
This is not a big deal because people can add the css to their code to make it adapt to any screen size but I think many people don't know how to do this. It's possible to just use jQuery to insert the css code & make it work for people without the css knowledge, like when they copy/paste iframe content from other websites that they want to include.