Page 1 of 1

How to customize the Behavior of Drag/Drop Operations ?

Posted: Thu Mar 30, 2023 6:42 pm
by Vince
Hello,

Reading the web page https://www.oxygenxml.com/doc/versions/ ... aid-title5, I see :
To customize what element gets inserted when a link is dropped, one can use the ro.sync.ecss.extensions.api.AuthorExternalObjectInsertionHandler Java API.
From this post post60111.html#p60111, I read :
At the moment all drag and drop handling is done on the client-side.
So, my question is : do we need to use java API or define a js plugin to handle the Behavior of Drag/Drop Operations into Oxygen Web Author ?

Regards,
Vincent

Re: How to customize the Behavior of Drag/Drop Operations ?

Posted: Fri Mar 31, 2023 11:19 am
by cristi_talau
Hello,
Drag & Drop involves both browser-side functionality and server-side processing of the objects that were dropped. To help you decide which path to follow, we need to understand your use-case better.
For, example, if you want to customize the XML element inserted when the user drops a link in the editor, you may need to use the Java API.
If you want to implement a side-view with objects that can be dropped in the editor, you may need to use the JS API.

Best,
Cristian