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:
<div id=“hideThisVideo” style=“display:none;”><iframe frameborder=“0” height=“360px” src=“//www.youtube.com/embed/W10F0ezCTIQ?autoplay=1” width=“640”></iframe></div><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’;”/>
But when I click nothing happens, it filters the "onclick" event and adds a paragraph tag:
<div id=“hideThisVideo” style=“display:none;”><iframe frameborder=“0” height=“360px” src=“//www.youtube.com/embed/W10F0ezCTIQ?autoplay=1” width=“640”></iframe></div> <p><img src=“/sites/all/themes/gloriajesus video.png” style=“cursor:pointer; height:390px; width:640px”></p>
I am using CKEditor with the module Wysiwyg.
Thanks in advance.