Issue #1720✓ SolvedOpened January 9, 2019by Ramkumar-Murugesan2 reactions

How to add the button in custom traits

Quick answerby ploutos272

hi again :) My bad, html button tags need textNode value is not visible remove value and add a textNode instead

Read full answer below ↓

Question

Hi, I try to add a button to my custom traits for my custom blocks but its not working fine as expected and also need to know how to call the function when we click that button, add icon inside that button also my code : my error screenshot: in the above screenshot, u can see an Add label inside the settings so what I need to show a button near the Add label. Thanks

Answers (3)

👍 Most helpfulploutos27January 9, 2019

hi again :) My bad, html button tags need textNode value is not visible remove value and add a textNode instead

ploutos27January 9, 2019

Hi, First you need to define the new trait (button) and create it. After you define the new trait type you must call it inside you custom block

Ramkumar-MurugesanJanuary 9, 2019

@ploutos27 Thanks for your reply, I tried your code but it shows input box instead of button and my updated custom traits code is and my custom blocks is can u help me

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.