Introduction
The Drag and Drop (dnd) module is responsible for the Scald UX. It is a generic module to create the drag and drop experience between a library and target fields. Library module must have a specified interface (see below), contains an atom list, a list of quick atom add buttons and provides search capabilities in the atoms list.
The DnD Library (scald_dnd_library) module is a built-in library to use with the DnD module. This library is mostly a view on the atoms with exposed filters to make the search. Thus it is customisable as a standard view in Views UI.
Drag and Drop module
Each dropped atom contain 2 parts:
- The "editor" part: is the rendered atom itself. The default library (scald_dnd_library) uses sdl_editor_representation context to render it. This part should generally not be modified, it could be in HTML format, or the token-like SAS (Scald Atom Shorthand) format and it is updated automatically.
- The "legend" part: usually is the atom title and atom author. You can modify, or even delete, text in this part. A provider can omit this part by setting
$atom->omit_legend = TRUE.
PHP part
Permission
The modules add on permission which is 'Administer DnD'.
Theme
We have one hook_theme implementation that will fire the dnd_library_wrapper function.