Issue #1780πŸ’¬ AnsweredOpened February 7, 2019by AkibDeraiya1230 reactions

How to change extra dropdown for link change trait

Quick answerby artf

Create a custom trait: https://grapesjs.com/docs/modules/Traits.html

Read full answer below ↓

Question

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 want to add one more dropdown for the default links. If user will select the links from the drop-down then also need to change href of selected link and on other hand if user will type link into href input text-box(marked in above image) then also need to change the href of selected links. How can i do this things can you please help me?

Answers (3)

AkibDeraiya123β€’ February 11, 2019

Hello @artf If i only want to do in change trait for href(<a ) tag then how can i change that? I tried like, But this is something like not works. Can you please help me at where i am doing wrong?

AkibDeraiya123β€’ February 12, 2019

And one more question, how can i check the selected DOM element's type? I guess it will use isComponent function. But i don't know how to use it and where?

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.