GrapesJS / GrapesJS/components-custom-code

Cannot import template with <scrip>

Open
#36 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
81
Forks
47
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the import through the GrapesJS editor initialization with allowScripts: 1, both with the default configuration and the code module. Trace how the imported template handles its script portion, and consider the issue resolved when the script is preserved during import under the documented configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.