isenseDev/rSENSE — pull request #1806 by JKinsman (2014-10-08 20:33:06+00:00)
Title: Youtube Videos for Summernote (sort of)

Per @jdalphon 's request, I have enabled YouTube videos in Summernote.

This is (only sort of) complete. After updating the Summernote gem, I was able to get the add video controls to draw to the editor. However, when I added a picture through these controls, it was getting removed by the Rails HTML sanitizer. Since I'm assuming we do not want to exclude iframe objects from sanitization, I instead opted to use the auto_html gem, which takes a YouTube URL, and displays in its place an HTML 5 video player that will play the YouTube video specified in the URL. Since the Summernote controls for adding a video will not work (without excluding them from the sanitizer) I did not add the option to the control panel. For whatever reason, the iframes generated by the auto_html do not get removed by the sanitizer.

The proposed change is as follows:
Entering:
![beforesavevideo](https://cloud.githubusercontent.com/assets/6451941/4566394/95b80ee6-4f28-11e4-9a7c-6adb0fbefe2d.png)

Creates:
![aftersavevideo](https://cloud.githubusercontent.com/assets/6451941/4566395/9e9333ce-4f28-11e4-8e49-a1ddce33fd27.png)