Replies: 2 comments
-
Here's the related PR: #4067. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm not sure removing simply the plugin from the object makes sense. It would be quite a more complex task than that (think about removing all added blocks, components, styles, etc.) if we really want to implement it. In your case, I think you simply not doing the plugin in the proper way. Try to rethink it, you don't need to remove it, you might probably need a simple stateful command which actives stuff on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a plugin that I'm loading inside another function. That function gets called in different places with different args and the plugin needs to be added again to respect that newly passed arg to my loader function.
GrapesJS does not call the
add
function in plugins manager if it was added once before. I'm proposing 2 new functions here to add this to the GrapesJS plugins manager.remove: (id: string) => void
: To remove a specific plugin from the plugins object.removeAll: () => void
: To remove all the plugins. This basically can be used as a cleanup method in more complex cases.Right now, I'm doing this hack to reload my plugin with a new value:
@artf Please let me know your thoughts on this. I'm gonna send a PR for this.
Beta Was this translation helpful? Give feedback.
All reactions