Issue #940Opened March 9, 2018by phucphanJaneto2 reactions

GrapeJS can't load javascript

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)

vishal5033March 9, 20182 reactions

Hi

You can allow script when you init grapesJS instance.

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

Hope that helps you.

phucphanJanetoMarch 9, 20180 reactions

@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: image and image

can you help me?

josefphMarch 9, 20180 reactions

@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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.