Issue #1231Opened June 25, 2018by ivanezeigbo0 reactions

GrapesJs ignores <script> tags of templates (updated)

Question

When I include templates inside the <div id="gjs"></div> tags. It appears that GrapesJs ignores the <script> tags, but every other tag like <link> would work pretty well. The javascript functions in the script tag would not be able to work on the editor because of this. My code is designed to readfile and locate the links of any src or href in the code for any template regardless of design so I cannot add the script tags manually since it has to be general purpose for any template regardless of the arrangement of its folders and directories. Please help. How do I make my #gjs accept my <script></script> tags instead of stripping them away. Tagging also @artf . Thank you!

Answers (2)

ivanezeigboJune 25, 20180 reactions

Figured. Sorry. For those who might benefit from this, you have to set allowScript to '1' in init.

lock[bot]September 17, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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.