I have begun development on Junior Youth + Us again recently and decided to convert the whole website from PHP to Ruby on Rails. Although we were moving to a different platform, we didn’t think that the tools and how the site worked was logically flawed – it was more me wanting to use Ruby instead of PHP to learn more!
So one of the items I have worked over for the last 24 hours was the text editor for our contributors. Now because of the introduction to Bootstrap 3, the old support for embedding YouTube videos wasn’t working as well as it should have; you would think it would be a simple copy and paste job! Nevertheless, I dove into some JavaScript (or what I could understand it was doing anyway) and decided to make YouTube functionality work for the Bootstrap 3 version of the Bootstrap Wysihtml5 for Rails.
Bootstrap Wysihtml5 for Rails was developed by Nerian, however because he wants to keep the rails version the same as the original Bootstrap Wysihtml5, it might be some time before someone actually integrates YouTube embedding into the original. So with a little elbow grease, I was able to get YouTube functional on my version of Bootstrap Wysihtml5 for Rails.
I’ll be the first to admit it was one hell of a hack job since I’m not that crazy about JavaScript, but hey it works!
Before you go installing this, bare in mind that I only made the changes for the b3/bootstrap 3 version! If you would like to give it a go, you can fork it from my repo here:
GitHub Repo – Bootstrap Wysihtml5 for Rails with YouTube & Imgur Support
GitHub Repo – Bootstrap Wysihtml5 for Rails with YouTube Support Only
Please feel free to add any changes you think is necessary!