ui.DragDrop.getBuffer

Get drag & drop data from the buffer.

Syntax

getBuffer()
  RETURNS STRING

Usage

After identifying the MIME type of a dropped object with getSelectedMimeType(), you can call the getBuffer() method to get text data from the drag & drop buffer.

Drag & drop data is only available at ON DROP time, therefore, the getBuffer() method must be called in ON DROP only.

Note: When using URI MIME types (for file paths for example), the string returned from the getBuffer() method can contain URL-encoded characters such as %5E, which represents the ^ caret. Therefore, you must URL-decode strings returned from getBuffer() with util.Strings.urlDecode(). When setting the drag & drop buffer content, if required by the front-end platform, the string can be URL-encoded using util.Strings.urlEncode() for setBuffer(). However, URL-encoding file paths for setBuffer() is usually not required.