pasteboard.setAllowedTypes()

Type function
Return value none
Revision 2018.3381
Keywords setAllowedTypes, pasteboard
See also Pasteboard

Overview

Sets the file types that your app will accept when pasting. For example, if you only wish the app to paste strings, include just "string" in the allowedTypes table.

Syntax

pasteboard.setAllowedTypes( allowedTypes ) 
pasteboard.setAllowedTypes( nil )
allowedTypes (optional)

Table. Table containing a comma-delimited list of data types the app will accept for a paste action. Valid options include "image", "string", and "url". You can also pass nil to disable all paste operations.

Example

local pasteboard = require( "plugin.pasteboard" )

-- Set the data types this application allows for a paste action
pasteboard.setAllowedTypes( { "string", "url", "image" } )