Issue #868✓ SolvedOpened February 14, 2018by nojacko5 reactions

"component:add" event triggers when components are moved

Quick answerby artf2

@japo32 all available public events are documented here: https://grapesjs.com/docs/api/editor.html#available-events

Read full answer below ↓

Question

Taken from https://github.com/artf/grapesjs/wiki/API-Editorcomponent:add - Triggered when a new component is added to the editor, the model is passed as an argument to the callback My understanding is that the component:add should only be called when the block is dragged in from the blocks panel and dropped into the editor. I don't think this should happen when a block is moved around the editor (that's what component:update is for...) Reproducehttps://jsfiddle.net/szLp8h4n/11/Move any of the text components around in the page.An alert will be displayed. --- Great project btw. 👍

Answers (3)

seifelhoseinyJuly 12, 2022

Any update on this issue? It still calls component:add event when I simply move a component around.

lv-alexMarch 22, 2018

It works. Thank you @artf

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.