We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When importing a template that contains a script, the script portion is not imported. Even when using the "code" module, the result is the same.
This is despite enabling the allowScripts configuration option when initializing your GrapesJS editor.
const editor = grapesjs.init({ ... // the rest of your GrapesJS config allowScripts: 1, });
Any ideas? Thanks. S.
The text was updated successfully, but these errors were encountered:
This allowScripts parameter has apparently been deprecated.
allowScripts
You should try this:
grapesjs.init({ ... parser: { optionsHtml: { allowScripts: true, }, }, });
Sorry, something went wrong.
I fixed it with this configuration
const editor = grapesjs.init({
... allowScripts: 1, plugins: [ 'grapesjs-custom-code' ], pluginsOpts: { placeholderScript: '', }
});
And in my component added this editor.Components.removeType('script');
editor.Components.removeType('script');
Because this package remove any script (https://github.com/GrapesJS/components-custom-code/blob/master/src/components.ts#L15)
No branches or pull requests
When importing a template that contains a script, the script portion is not imported. Even when using the "code" module, the result is the same.
This is despite enabling the allowScripts configuration option when initializing your GrapesJS editor.
Any ideas?
Thanks.
S.
The text was updated successfully, but these errors were encountered: