Page 1 of 1

TinyMCE sandboxes scripts in iframes

Posted: Wed Apr 24, 2024 5:10 pm
by perissf
Hi,
I noticed that there is no way to allow iframes with JS (like [youtube] embed) with TinyMCE editor because it inserts a sandbox attribute.
Apparently there is a recent TinyMCE option to allow it (TINY-10348), but it's not available in the plugin options.

https://github.com/tinymce/tinymce/blob ... ANGELOG.md

Re: TinyMCE sandboxes scripts in iframes

Posted: Tue Apr 30, 2024 1:15 pm
by jflash
I confirm it. I put to article:
<iframe src="https://drive.google.com/file/d/gkhbjfblkjgdf/preview" width="2000" height="700" allow="autoplay"></iframe>
and TinyMCE adds sandbox="" attribute automatically:
<iframe src="https://drive.google.com/file/d/gkhbjfblkjgdf/preview" width="2000" height="700" allow="autoplay" sandbox=""></iframe>
and result is embed file shows only first page. I need to change editor to none under my profile (i tried only this) and then i go to edit article again...