Drag and drop Text

Good day, I am having an issue with find information on the documentation on how to change the text when you drag a clonable draggable element. Referencing the link below

https://stackblitz.com/github/syncfusion-content/ej2-angular-docs/tree/master/ej2-angular/code-snippet/common/drag-drop-action-cs1?file=src%2Fapp.component.ts


I need to be able to set the clone property as true. Then when i drag, instead of it writing Draggable it needs to be an html like <div> Red </div> or just the text RED


Ive selected ListBox control as there is no control to associated with my query


3 Replies 1 reply marked as answer

MI Mohamed Imran Thamin Ansari Syncfusion Team July 8, 2024 12:32 PM UTC

Hi nqaba nleya,


Thank you for reaching out to us.

 

We have evaluated your query and understand that you need to customize the cloned element on setting the clone property to true. We would like to inform you that we have a helper function that defines a callback function for customizing the cloned element before the drag starts. This allows you to customize the cloned element and return it as needed.

 

For more detailed information on the draggable API, please refer to our API reference documentation, which you can find at the following link: API Reference Documentation.

 

To assist you further, we have attached a sample StackBlitz example that demonstrates the scenario. You can access it here: Sample StackBlitz Example.

 

If you have any additional questions or need further assistance, please feel free to contact us.

 

Best regards,

Mohamed

 


 



Marked as answer

NN nqaba nleya replied to Mohamed Imran Thamin Ansari July 8, 2024 12:49 PM UTC

Thank you, this works



MI Mohamed Imran Thamin Ansari Syncfusion Team July 9, 2024 05:12 AM UTC

Hi nqaba, 

We are glad that your issue has been resolved. If you need any further assistance, reach out to us.

Regards,
Mohamed


Loader.
Up arrow icon