Disable scripts on canvas
Hi @kuhelbeher I'm still trying to achieve that too, but here's a tip that can help us to achieve it. I'll post here if I figure out a way. See this issue #2772
Read full answer below ↓Question
Hello, first of all thanks for a great tool. On my project i hit the problem where I need to disable scripts inside the editor. I found 2 similar issues with this problem - https://github.com/artf/grapesjs/issues/2046 https://github.com/artf/grapesjs/issues/2814. So the problem is quite common and maybe it's better to add such feature to the next version? In https://github.com/artf/grapesjs/issues/2046 issue @sdrebel mentioned that he's removing scripts in canvas and running them only in preview mode. Can someone prompt how to do it, I didn't find a way how to remove and set js for the templa...
Answers (3)
Hi @kuhelbeher I'm still trying to achieve that too, but here's a tip that can help us to achieve it. I'll post here if I figure out a way. See this issue #2772
@RJCAM thanks for tip, I tried that, but problem with this approach is that it disables script for component, not the whole template.
Once the editor and its components are loaded it's hard to think about disabling JS, think about a component with custom scripts that binds events all around the DOM (maybe even using some external plugin). The only way it could be possibly done is to reload the entire Frame (with the current compo...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1368
Resize canvas
Is there a way to have a dynamic resizing of the canvas? i.e not using the Device Manager, but having a drag and drop of the width, similar...
Issue #1791
Name of the destination
@artf, Is there any way to show the name of the destination element ?
Issue #2692
[BUG] Quick mouse clicks/movements can cause the editor to freeze
First off thanks for all your hard work on the project! This is a very great project that a lot of people depend upon, so thanks for your e...
Issue #2148
[QUESTION] IE11 (Unable to get property 'style' of undefined)
Hi! Just faced the same issue: https://github.com/artf/grapesjs/issues/1295#issuecomment-410046832 While click on one of this buttons this....
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.