Type function Revision Release 2024.3703 Keywords paste, pasteboard See also Pasteboard pasteboard.copy() pasteboard.clear()
Pastes the top-most item on the pasteboard.
Image copying/pasting is only supported on iOS.
pasteboard.paste( [listener] )
Function. Listener function to be called when the paste is executed. This function is passed an event
table which may contain the following properties, depending on the type of the data pasted:
local pasteboard = require( "plugin.pasteboard" ) -- Callback function for the paste method local function onPaste( event ) -- Print the type of data on the pasteboard print( "Type of data:", pasteboard.getType() ) -- Paste an image if ( event.filename ) then print( "filename is:", event.filename ) print( "baseDir is:", event.baseDir ) end -- Paste a string if ( event.string ) then print( "string is:", event.string ) end -- Paste a URL if ( event.url ) then print( "URL is:", event.url ) end end pasteboard.paste( onPaste )