grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Adding new button in toolbar

Open lauragadea opened this issue 8 years ago • 5 comments

Hello,

I am trying to add a new button to the toolbar of all the components. I been able to add for each component separatly, but not for all of them at once. To note that I want to avoide modifying the file ‘src/grapesjs/dom_components/model/Component.js’

Is there a way to do that?

Thank you in advance for yur help!

lauragadea avatar Jan 24 '18 15:01 lauragadea

@lauragadea , please check #266

JulyanoF avatar Jan 24 '18 19:01 JulyanoF

Yes @JulyanoF , I already have. And it suggests modifying the files ‘src/grapesjs/dom_components/model/Component.js’. That is exactly what I am trying to avoid.

lauragadea avatar Jan 24 '18 19:01 lauragadea

@lauragadea probably you should try to extend default component types (eg. default, image, text, etc.)

artf avatar Jan 25 '18 14:01 artf

Hi,

I added a new button in the toolbar for adding new sections successfully but I need to place that tool alone at the bottom of the section (as per attached screenshot). Can you please let us know how to achieve this? new_section

Thanks.

mailtopaul8 avatar Apr 05 '19 05:04 mailtopaul8

@mailtopaul8 I think it would be better to rely on custom component view #1827

artf avatar Apr 10 '19 11:04 artf