grapesjs-custom-code
grapesjs-custom-code copied to clipboard
Script Tag is sanitized in the output
Hello,
When using the following custom code
<script> alert('hi') </script>
The result would sanitize the script tag as following
<script>alert('hi')</script>
Am I missing anything?
Hello,
You could try with this config and see if it works for you:
grapesjs.init({
...
parser: {
optionsHtml: {
allowScripts: true,
},
},
});
I used the following configs:
grapesjs.init({
allowScripts: true,
I used the following configs:
grapesjs.init({ allowScripts: true,
This one is deprecated, it might not work anymore in the future.
@deprecated in favor of `config.parser.optionsHtml.allowScripts`