Dynamically adding plugins/components? #5996
Answered
by
artf
addlistener
asked this question in
Q&A
-
Let's say I have
I checked the docs https://grapesjs.com/docs/modules/Plugins.html#basic-plugin you can only add plugins when calling The use case will be supporting dynamic components. |
Beta Was this translation helpful? Give feedback.
Answered by
artf
Jul 12, 2024
Replies: 1 comment 3 replies
-
The plugin is usually a simple function, so you could call it by passing the current editor instance and the options you need. import someGjsPlugin from 'someGjsPlugin';
// ...
const editor = grapesjs.init({...});
// ...
someGjsPlugin(editor, { ...plugin options.. }); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
addlistener
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The plugin is usually a simple function, so you could call it by passing the current editor instance and the options you need.