Enabling JavaScript from CKEditor I would like to enable javascript to be added inside CKEditor. The editor filters all my javascript and I would like to make a transtision from an image to a youtube iframe, here is the code that I am using:

&lt;div id=“hideThisVideo” style=“display:none;”&gt;&lt;iframe frameborder=“0” height=“360px” src=“//www.youtube.com/embed/W10F0ezCTIQ?autoplay=1” width=“640”&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;img style=“width:640px;height390px;cursor:pointer;”src=“/sites/all/themes/gloriajesus/video.png” onclick=“this.style.display=‘none’;document.getElementById(‘hideThisVideo’).style.display=‘block’;”/&gt;


But when I click nothing happens, it filters the "onclick" event and adds a paragraph tag:

&lt;div id=“hideThisVideo” style=“display:none;”&gt;&lt;iframe frameborder=“0” height=“360px” src=“//www.youtube.com/embed/W10F0ezCTIQ?autoplay=1” width=“640”&gt;&lt;/iframe&gt;&lt;/div&gt; &lt;p&gt;&lt;img src=“/sites/all/themes/gloriajesus video.png” style=“cursor:pointer; height:390px; width:640px”&gt;&lt;/p&gt;


I am using CKEditor with the module Wysiwyg.

Thanks in advance.
Hope this will help you, For achieving your goal you need to create a plugin of ckeditor, First of all read more about ckeditor plugin, and create a view to get all the video with the display in a page, you can use the views page url for the ckeditor plugin to insert the media on ckeditor, a good tutorial is here.Click Here 

this is one of the module which will help you click here &amp; click here