Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and drop block event #205

Open
wagnerlduarte opened this issue Jan 11, 2023 · 5 comments
Open

Drag and drop block event #205

wagnerlduarte opened this issue Jan 11, 2023 · 5 comments
Labels
question Further information is requested

Comments

@wagnerlduarte
Copy link

wagnerlduarte commented Jan 11, 2023

How can I get the drag-and-drop event? I searched the code base to check the possibility of getting these events, but don't found.

I would like to get the drop event to validate if the custom block created by me can drop on the template because I would like to add only one block of this type inside my template, and I need this event to check before adding some block inside the template.

It makes sense, it is possible?

@wagnerlduarte
Copy link
Author

So, I understood that getSameParent is used to validate the drop of component, but I need to get the event after this drop happens because I'm using the custom component ProductRecommendation and I would like to validate that have only one ProductRecommendation in my template, for example.

I saw that the EventManager have some options, but the ADD_BLOCK is not implemented. So, I don't know if have a good way to get the drag and drop event outside the core application easy-email to intercept this action and do something when the user adds some new component on the template, do you know?

@renyuanz renyuanz added the question Further information is requested label Jan 15, 2023
@m-Ryan
Copy link
Collaborator

m-Ryan commented Jan 29, 2023

Sorry, I just noticed now, for your case, we need to implement the ADD_BLOCK event, do you still need this feature? @wagnerlduarte

@wagnerlduarte
Copy link
Author

@m-Ryan I created a workaround to solve this problem, but I think is important to implement this feature to make it more dynamic. In my case, I used a validation when the user change a dropdown on sidebar attributes. But if I want to validate before that, without this event it's not possible.

@thijs-qv
Copy link

thijs-qv commented Feb 13, 2023

Sorry, I just noticed now, for your case, we need to implement the ADD_BLOCK event, do you still need this feature? @wagnerlduarte

@m-Ryan so at this moment there is no event that is fired when the page is modified? My usecase: I am placing the editor on a page of a multi step form and would like to store the html when it has changed so the user does not have to manually press submit before moving on to the next page in the form.

edit: solved by using the values provided by the EmailEditorProvider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants