Issue #2052πŸ’¬ AnsweredOpened May 31, 2019by tsuwunrut-carecloud0 reactions

Merge Fields

Quick answerby artf

Generally, to prevent losing selection on element click you use event.preventDefault() so it might your case, but I'm not sure. Try at least to create a reproducible demo, BTW I close the issue as it has nothing to do with the core itself

Read full answer below ↓

Question

I have a question regarding merge fields, similar to https://github.com/artf/grapesjs/issues/481. I'm trying to have my merge field icon button toggle a modal with an inputdropdown, then after selecting an option from the dropdown, have the merge field insert itself. ^ I have something along these lines. Clicking the icon button simply stores a function in the window object to be called after I select an option from the inputdropdown. Now this actually works perfectly except for one problem. If I decide to hit "enter" multiple times at the very end of the text area and try to add a merge fiel...

Answers (1)

artfβ€’ Jun 2, 2019

Generally, to prevent losing selection on element click you use event.preventDefault() so it might your case, but I'm not sure. Try at least to create a reproducible demo, BTW I close the issue as it has nothing to do with the core itself

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.