Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Youtube responsive TinyMCE

by , Last updated on 2 months ago in Modifications and Requests - 9
Hi,

when i use TinyMCE as editor in blogs and news, i can put a youtube video. But its not responsive.
my visitors are for 80% in a mobile device, so it would be nice to make it responsive.

is there a easy workaround for this?

Sorry, found the solution here.
https://www.php-fusion.co.uk/infusions/forum/viewthread.php?thread_id=39041&pid=204868#post_204868

<div class="embed-responsive embed-responsive-16by9">
 <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/VIDEO_ID" allowfullscreen></iframe>
</div>
PHP-Fusion Development Manager
Web Designer/Developer: GitHub
lifeguard has replied to this - 2 months ago

RobiNN wrote:

@RobiNN -
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/VIDEO_ID" allowfullscreen></iframe>
</div>


This is the same almost.
Is this better then the one from the link i post?
yes, and does not require any unnecessary css because is from Bootstrap
PHP-Fusion Development Manager
Web Designer/Developer: GitHub
Ok, good to hear.

But, if i use that code, i have to write that code everytime i write a new blog or something.
Yes, this is the responsive code I use as well, for YouTube in articles, news etc.
Doesn't work in Forums or Comments though, due to BBC Code.
For my Comments section, I also add a public instance of Disqus, and have the Div Code set up as a panel.
Works great, including auto responsive for video.
lifeguard has replied to this - 2 months ago

ikandi wrote:

@ikandi - Yes, this is the responsive code I use as well, for YouTube in articles, news etc.
Doesn't work in Forums or Comments though, due to BBC Code.
For my Comments section, I also add a public instance of Disqus, and have the Div Code set up as a panel.
Works great, including auto responsive for video.


Code is great, bb code is already responsive so tahts great.
on my comments, i dont like to see video's smile
ikandi has replied to this - 2 months ago

lifeguard wrote:

@lifeguard

Code is great, bb code is already responsive so that's great.
on my comments, i dont like to see video's smile


Well as for bbcode and videos, yes and no.
You have to flip your phone into landscape to view a YouTube video.
It doesn't strictly conform to portrait mode, as it overlaps out the right hand side.
Videos are a big thing for my site so they can appear anywhere.
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: lifeguard, RobiNN, ikandi