Issue #1587💬 AnsweredOpened November 16, 2018by Geelik0 reactions

How to distinguish events for custom components

Quick answerby artf

For the component dropped from the block manager you can use this event block:drag:stop. As arguments for the callback you get, the dropped component model (if dropped successfully) and the model of the block

Read full answer below ↓

Question

Hi,

I have an issue with events. I would like to distinguish events wwhen a component is loaded using 'fromElement' config from when it's loaded by dragging a block.

The problem is init or initialize are called in both case and i didn't find a property that change between both case.

Answers (2)

artfNovember 17, 2018

For the component dropped from the block manager you can use this event block:drag:stop. As arguments for the callback you get, the dropped component model (if dropped successfully) and the model of the block

lock[bot]November 17, 2019

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.

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.