Issue #544💬 AnsweredOpened November 20, 2017by mohit55400 reactions

Add select with optgroup

Quick answerby artf

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

Read full answer below ↓

Question

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

Answers (3)

artfNovember 21, 2017

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

mohit5540November 21, 2017

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

lock[bot]September 18, 2019

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.

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.