Issue #940✓ SolvedOpened March 9, 2018by phucphanJaneto2 reactions

GrapeJS can't load javascript

Quick answerby vishal50332

Hi You can allow script when you init grapesJS instance. const editor = grapesjs.init({ ... allowScripts: 1, }); Hope that helps you.

Read full answer below ↓

Question

Hi. I have some script tag in my html code (includes js file and internal javascript tag) But GrapeJS doesn't load any script and apply this.

Can I have any way load javascript to grapejs and export html include javascript code?

Answers (3)

👍 Most helpfulvishal5033March 9, 2018

Hi

You can allow script when you init grapesJS instance.

const editor = grapesjs.init({ ... allowScripts: 1, });

Hope that helps you.

phucphanJanetoMarch 9, 2018

@vishal5033 : many thanks for your helps. it works for me. The script file and internal js will show when export html. But I see the error message: and can you help me?

josefphMarch 9, 2018

@phucphanJaneto try to post your code? maybe something is missing or you got the wrong syntax.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.