Custom component save
Hi @sonnylloyd I think the problem is that you're not reflecting correctly the icon property. Try with this
Read full answer below ↓Question
hi @artf sorry to be a pain i really didn't want to open a issue ticket but i have been stuck for days trying to achieve my end goal i have made a simple plugin that adds icon support (font awsom) so i have a components.js a block.js and a main.js with some configs i have managed to get the onchange working, however i dont know how to update the modal as on refresh the new selected icon goes back to the default icon. im sure i am doing something wrong and i have looked through all your gjs and cant figure it out block.js component.js and in the main.js i have some defaults set up (i have cut...
Answers (3)
Hi @sonnylloyd I think the problem is that you're not reflecting correctly the icon property. Try with this
Thanks @artf i have been playing with your suggestion but with no luck. again sorry for being a pain heres the updated component.js
@sonnylloyd check better my code, you've changed init() inside the model which was ok in your previous code. As you see, under the ...model, you only have to change the updateIcons()
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1964
[QUESTION] Minimal requirements to create a custom component
I've been reading the docs all day on creating a custom component. I've also looked at grapesjs-mjml for an example. I'm trying to create a...
Issue #348
Script tag on component after save and reload runs infinit
I am in the middle of working on some custom components/blocks. To achieve this i have been using the api docs and using your grapejs plugi...
Issue #665
Custom component and save
Sorry, me again ! I'm trying to save my template with my new component "img-link" : But when I save my template using the gjs-get-inlined-h...
Issue #1991
[QUESTIONS] resizable, using unitWidth in px output into percent.
Hi @artf, Thanks for making this amazing framework. Recently I made a custom component based on your flexbox plugin. The red arrow is the a...
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 →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.