Issue #3162Opened November 27, 2020by sashapawlow7260 reactions

Button switcher to editor.allowsCripts

Question

Hello, @artf ! :) Maybe you can help with grapesjs. I have buttons which has own scripts(e.g. opening modal window by click). And if I set property allowScripts: 0 - I can to edit these buttons, but if editor.allowScripts == 1, buttons execute logic(e.g. opening modal window) and I can't to edit buttons in that case. I found a great solution - it's switch property allowScripts = 0 : 1, but changes are only applied after page reload. How can I switch scripts? p.s execute command editor.refresh() after change a value allowScripts does not bring results

Screenshot_24

Answers (2)

artfDecember 1, 20200 reactions

I'd recommend creating a custom component for those buttons to handle the logic with scripts

sashapawlow726December 1, 20200 reactions

@artf thank you very much! :+1:

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.