Add select with optgroup
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)
Hi @mohit5540, you have to define a new Trait if you want custom stuff
@artf yes, I created custom trait and it worked. Thanks.
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.
Issue #1780
How to change extra dropdown for link change trait
Hello @artf , I want to give one more functionality to user like user can change any link with default links drop down. In above image i wa...
Issue #1393
[Question] Add grapesjs color picker to a new trait type?
I'm building a a new trait type, and would like to be able to include the grapesjs color picker inside it - any suggestions on how to do th...
Issue #613
How can I add text to PanelManager?
Hello, artf! Thank you for grapesjs. Please, help. I need a title to be shown at the top like a button or a simple text element.
Issue #1324
Remove attributes from a component
Hi @artf I don't know if it is possible to remove an attribute from a component. In our project I'm injecting a custom attribute from a cus...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.