GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.06k forks source link

Add select with optgroup #544

Closed mohit5540 closed 6 years ago

mohit5540 commented 6 years ago

Hello @artf

I have recently started using grapeJs and found it awesome.

Can you please help me on How can I add dropdown(select) with optgroup inside trait. Or is there any custom option available like 'html' where I can add my own html traits: [{ label: 'PartialName', name: 'selectPartial', type: 'select', changeProp: 1, html: 'custom html' // e.g., for custom html }],

Thanks

artf commented 6 years ago

Hi @mohit5540, you have to define a new Trait if you want custom stuff

mohit5540 commented 6 years ago

@artf yes, I created custom trait and it worked. Thanks.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.