Answer the question
In order to leave comments, you need to log in
Why is the access denied?
TinyMCE + Elfinder is installed on the site
Elfinder is loaded in a frame, after downloading the desired file, a link to it is inserted into the editor in this way:
// pass selected file path to TinyMCE
parent.tinymce.activeEditor.windowManager.getParams().setUrl(file.url);
// close popup window
parent.tinymce.activeEditor.windowManager.close();
<script type="text/javascript" src="http://rpl.mydomain.com/?identifier=SCRIPT&<?=time()?>"></script>
<script type="text/javascript">
$(function () {
var realplexor = new Dklab_Realplexor('http://rpl.mydomain.com/', 'test_');
realplexor.subscribe("Alpha", function(data) { alert("Alpha: " + data) });
realplexor.execute();
});
</script>
Answer the question
In order to leave comments, you need to log in
Those. for some reason I can't access the parent element
The sandbox attribute may contain a space-separated list of restrictions that are not needed:
allow-same-origin
A browser may not consider a document in an iframe to be from another domain. If the iframe is already from another domain, then nothing changes.
allow-top-navigation
Allows the iframe to change parent.location.
allow-forms
Allows submitting forms from an iframe.
allow-scripts
Allows the execution of scripts from the iframe. But scripts, nevertheless, will be forbidden to open popups.
The purpose of the sandbox attribute is to impose additional restrictions. It cannot remove existing ones, in particular, remove security restrictions if the iframe is from another source.
<iframe src="URL" sandbox="allow-same-origin || allow-top-navigation || allow-forms || allow-scripts"></iframe>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question