Hi!
On a webpage i coded a consent solution that don't loads YouTube-videos until consent is given. I write the url in the "data-src" attribute and when consent is given javascript copies it in the "src" attribute and the video is loaded.
It works fine. You can see it here for example: https://www.benott.de/blog/hotel-kaiserhof-gastgeber-aus-leidenschaft
Problem is when i swap from codeview to editor view in JCE Pro the iframe gets erased. Code is like this: <iframe data-src="https://www.youtube-nocookie.com/embed/TUsqL7oHzno" allowfullscreen="allowfullscreen" frameborder="0" height="315" width="560" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>
I put iframe[data-src] to the extended elements and iframes are allowed in the media support. Clean up html is turned off.
Is there a solution for this problem?
Kind regards, Sascha
On a webpage i coded a consent solution that don't loads YouTube-videos until consent is given. I write the url in the "data-src" attribute and when consent is given javascript copies it in the "src" attribute and the video is loaded.
It works fine. You can see it here for example: https://www.benott.de/blog/hotel-kaiserhof-gastgeber-aus-leidenschaft
Problem is when i swap from codeview to editor view in JCE Pro the iframe gets erased. Code is like this: <iframe data-src="https://www.youtube-nocookie.com/embed/TUsqL7oHzno" allowfullscreen="allowfullscreen" frameborder="0" height="315" width="560" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>
I put iframe[data-src] to the extended elements and iframes are allowed in the media support. Clean up html is turned off.
Is there a solution for this problem?
Kind regards, Sascha