Issue #429💬 AnsweredOpened October 17, 2017by sonnylloyd0 reactions

Custom component save

Quick answerby artf

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)

artfOctober 17, 2017

Hi @sonnylloyd I think the problem is that you're not reflecting correctly the icon property. Try with this

sonnylloydOctober 17, 2017

Thanks @artf i have been playing with your suggestion but with no luck. again sorry for being a pain heres the updated component.js

artfOctober 18, 2017

@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.

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.