XML Editor - Drag & drop assetsCustomize
Customize the drag & drop functionality.
Overview
The censhare xe:drag-item widget supports these drag-types:
- files
- censhare-drag-token (for InDesign-Interface)
- assets for special use cases via "app/common/schemas/XMLEditorSchema.xsd"
Assets can be dragged from within XMLEditor dialogs using xe:drag-item of type "asset". The value attribute must contain an XPath expression, which should return one of the following:
A single asset XML or a list of asset XMLs
A single asset ID or a list of asset IDs
Sample snippet
<xe:draggable>
<xe:drag-item type="asset" value="=:(10033)"/>
<xe:group>
<xe:label value="Drag Asset"/>
</xe:group>
</xe:draggable>
The attribute "value" is mandatory for this type and must return one of the following:
a) a single asset XML
b) a list of asset XMLs
c) a single asset ID (integer number)
d) a list of asset IDs (integer number)
e) nothing (), "" ==> nothing is dragged