Closed alfaalex81 closed 6 years ago
Have you tried with this?
const editor = grapesjs.init({
...
allowScripts: 1,
});
Sure, other scripts with "allowScripts" parameter work fine, but scripts inside "on load event" don't.
I inject the code in this way:
var newComps = editor.DomComponents; $.get('http://myexamplepages.com', function (e) { newComps.setComponents(e); }); window.editor.setComponents(newComps);
Thanks.
@alfaalex81 can you provide a live demo of the issue?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi! I have a problem with some templates. This template has some scripts running after the page is loaded. When this templates is loaded by GrapeJs, the scripts do not starting because browser not detect the ending of load.
It's possibile to load templete in a classic iframe (not injected)?
For example:
<iframe src="http://myexamplepages.com" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%"></iframe>
It is possible to use this solution or you can suggest other one.
Thanks.