responsive YouTube in tinymce

5 posts by 2 authors in: Forums > CMS Builder
Last Post: July 11, 2016   (RSS)

By rez - July 10, 2016

How can we make YouTube embedded video responsive in the wysiwyg editor of CMSB?

something like:

https://yomotherboard.com/how-to-make-youtube-embeded-videos-responsive/

By Toledoh - July 11, 2016

I use http://fitvidsjs.com/ - pretty simple to implement and works a treat.

Cheers,

Tim (toledoh.com.au)

By Toledoh - July 11, 2016

Hey Res,

Basically, you set fitvids.js to look for video within a certain class or ID.  So if you wysiwyg content field is outputted into a div of the id="blogContent", the jQuery will automatically make that video responsive.  Like magic:)

<script src="path/to/jquery.min.js"></script>
<script src="path/to/jquery.fitvids.js"></script>

<script> $(document).ready(function(){
$("#blogContent").fitVids();
});
</script>

Cheers,

Tim (toledoh.com.au)

By rez - July 11, 2016

Oh, that's really nice. I'll def grab it. Thanks!