Issue #2046💬 AnsweredOpened May 29, 2019by sdrebel1 reactions

How to disable Scripts inside the editor?

快速解答by sdrebel1

Hi @artf , Thank you for the reply. Right now i'm removing all the scripts and running only in preview mode.

Read full answer below ↓

Question

Hi @artf , I need to disable all the scripts (component scripts and other scripts) inside the editor, and scripts should run only when we click on 'preview button'. Is there any method for it?

Answers (3)

sdrebelJuly 4, 2019

Hi @artf ,

Thank you for the reply. Right now i'm removing all the scripts and running only in preview mode.

artfMay 31, 2019

No, at the moment, there is no kind of public API to do that

mariasmolSeptember 5, 2019

Hi @sdrebel would love if you can share your solution. Also,after allowing scripts in the editor i copied this example to import image pressed the import and saw the hello world. however when using the preview mode i don't see the alert . Do i need to configure something to execute scripts in preview mode? Also my next step is that i would like the editor not to execute the JS , hoe did you handle it? by adding CDATA? thanks for the help!

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.